Loading...
 

User and Registration tracker


You can use trackers to collect additional information for users during registration. Some uses of this type of tracker could be:

  • To collect user information (such as mailing address or phone number)
  • To require the user to acknowledge a user agreement
  • To prevent spammer registration, by asking new users to provide a reason why they want to join (the prompt should tell the user that his answer should indicate that he or she clearly understands what the site is about).


See also: Group Tracker for a tracker that allows a sign-up form for groups.

Follow these steps carefully. Or you can apply the User_Trackers profile in your Tiki site through the Profiles Wizard > "Demo of commonly used configurations" > User & Registration Tracker"

1.1. Activate tracker feature.

  1. Activate the tracker feature (Control Panels->Features->Trackers)
    User Tracker V20x 01

1.2. Enable the Registration Tracker.

  1. From the Control Panels->Log in page, enable the Use a tracker to collect more user information option.
    User Tracker V20x 02

1.3. Configure the tracker.

  1. Create a new tracker (List Trackers link).
    1. From the System Menu, select the Trackers > List Trackers link.
      User Tracker V20x 03
    2. Click the Create option.
      User Tracker V20x 04
    3. In Name (under General), enter a name for the tracker, such as New User Registration Form.
      User Tracker V20x 05
    4. Save the tracker.
    • To have the tracker's items visible to only the user, you must set special permissions on the tracker. This is optional and you can do this later if you want.
    • You do not have to apply tiki_p_create to the tracker.
  2. Add fields to the tracker.
    1. You must have at least one field of Type User selector and its Auto-Assign field (under Options for user selector) populated with Creator.
      This field will automatically contain the user's username.
      User Tracker V20x 06
      Note Important: Be sure to note the FieldID for this field. You will need it later.
    2. Add other fields to the tracker to collect the desired information (such as addresses, phone numbers, etc)
    3. Save the fields.

1.4. Assign the tracker to the group "Registered".

  1. From the Admin groups page (Settings menu->Groups), edit the Registered group.
    User Tracker V20x 07
  2. In the User Registration Tracker field, select the tracker that you created.
    User Tracker V20x 08
  3. The User Registration Tracker section now has a second drop-down list of the fields in the tracker.
  4. Select the User field that you created earlier with Auto-Assign = Creator (note that this may have been already pre-selected).
    User Tracker V20x 09
  5. In the Group or User Tracker Registration Fields field, indicate the ID of each tracker field to include in the form that users must complete as part of the registration process. Multiple fields must be separated by a colon.
    User Tracker V20x 10
  6. Save the group.


Note: A user can choose at registration a group among a list of groups (the list is specified in "Admin > Login"), and set that each group has a different user tracker associated to it. This way, the tracker displayed at registration time would be the one assigned to the group selected by the new user at registration time.

Note Two: As of Tiki 18 at least, if you have a user tracker assigned to the Registered group and you use "Choose Group" you need to replicate the tracker and field settings on each group you offer as a choice. The groups need to have "User Choice" set too.

Perms:
If you want the items to be seen only by his user, you must set special perm on the tracker, as tiki_p_admin_trackers for the admin group.
Even if there is no tiki_p_create_tracker_items for the tracker, the user will be able to create his item and if (Item creator can modify his items) is set, he will be able to modify it.

Access to the user tracker item:
Important: It can be necessary in some case to set the group that has the tracker as the default group for the user.
The user can see his user tracker, if the permissions are ok with:
tiki-view_tracker_item.php?view=+user
You can see the user tracker of another user , if the permissions are ok and if the item exists with:
tiki-view_tracker_item.php?user=yyyyy&view=+user

Note: a user can have many trackers items associated to him. Each tracker must have a field of type user selector and option creator(1). To be able to see the item associated to the user (if permissions are ok) you can use:
tiki-view_tracker_item.php?group=xxx&user=yyyyy&view=+user - the group must have a user tracker
tiki-view_tracker_item.php?trackerId=yyyyy&view=+user - the tracker must be a user tracker

To let users edit their user tracker in a wiki page

example (replace ids with your own)
Copy to clipboard
{TRACKER(trackerId="1", fields="2:3:4:5:7:8:9:10:11:27:17:28:19:12:22:21:18:20: 23:24:25:26", max="-1", view="user")}{TRACKER}

Note: "Only one item per user or IP" tracker option must be checked at tiki-admin_trackers.php?trackerId=yyy.

If you want nicer formatting of this page, you can use a Pretty Tracker

To synchronize the realName user preference from fields in the tracker


The realName user preference normally set in tiki-user_preference.php is used by Tiki to be shown in a variety of places, such as attribution for edits and so on. If this is not yet the case, get in Control Panels->User Settings->User Info and Picture and check Show user's real name.
From Tiki 6 onwards, this realName user preference can be automatically updated whenever certain fields in the user tracker are updated.

To set this up, get in Control Panels->Log in page and set the user tracker for "User tracker IDs to sync prefs from". This may seem redundant considering all of the above but there may be more than one user tracker if there are different ones set for different groups (but most of the time there will be only one). There might even be no user tracker set for any group. All you need is a tracker with a User selector field configured as explained above.

Then, set "Tracker field IDs to sync Real Name pref from:". You can update from multiple fields and set the priority of field sets to choose from. For example, if fieldId 10 is First Name, 11 is Last Name, and 12 is Preferred Name, then a setting of "12,10+11" will first check if the user has a preferred name set and use that if so, and if not, then it will use the First Name/Last Name combination with a space in between.

Using Pretty Trackers to generate the Registration Tracker


To set this up, turn on the feature "Use pretty trackers for registration form", and specify a wiki page template or .tpl file template to be used as the pretty tracker template under "Registration pretty tracker template:"
If a wiki page is specified as template, you need to apply the permission tiki_p_use_as_template for Anonymous on the wiki page.

In addition to regular Pretty Tracker fields to refer to fields in the User tracker, you have the following syntax that you will have to use in your pretty tracker template to place basic registration fields.

Copy to clipboard
{$register_login} {$register_email} {$register_pass} {$register_pass2} {$register_passcode} {$register_groupchoice}

In Tiki 8 you have to specify:

Copy to clipboard
{$register_antibot}
  • register_pass2 refers to refers to the repeat password field.
  • register_passcode refers to the passcode that the user might have to enter to be able to register if that feature is enabled
  • register_groupchoice refers to the group selection field if that feature is enabled
  • if you have "Use email as login" feature enabled, register_login is the one you should use, and register_email is not needed.

To have the user name link (when clicking on a username or realname) to go to the user tracker item instead of the Tiki user preferences.

Go to Admin -> General -> Navigation;
In the field "URL to go to when clicking on a username" :

Copy to clipboard
tiki-view_tracker_item.php?trackerId=1&view=+user&user=%user%

(trackerId= your user information tracker id)

Be sure that your user information are set to "Public" by default.

See Also

alias

List Slides