Using the Identity API call

Part 1: Setting up the Identity Code

If your website has registered users, you can connect the user's email address, username, customer ID or other identifying string to their survey response, using the Identity feature. Most of our customers pass along the logged-in visitor's email address as a visitor navigates through the site. If you target your survey to pages where a visitor can be logged in, and implement the Identity feature, your visitor's email address will be associated with their survey response.

The Identity feature requires that a second piece of code is added after the main Qualaroo JavaScript on each page of your site. This is how you find the Identity code on your site:

  1. Go to your Dashboard
  2. Click "View Code" or "Install Code"
  3. Click on the blue link, "Does your website have registered users? If so, you should also add this code..."

The following code will appear, and should be added to your site:

<script type="text/javascript" charset="utf-8">
    _kiq.push(['identify', 'YOUR_IDENTIFIER_HERE']);


However, YOUR_IDENTIFIER_HERE should be replaced by code that pulls the current visitor's email address (or other identifier) from your system. We can’t write it for you because we don’t know what language you use or how you name your variables.

This is something that your developers will be able to help you with.

For example, if your site uses PHP, the identify call might look like this: 

_kiq.push(['identify', '<?php echo $current_user->email ?>']);

Note: Our system knows that if it detects an empty identifier string, that the visitor is "unknown." If you're using the Identity feature as a targeting setting, you can target

  • known visitors (logged-in, non-empty identifier string),
  • unknown visitors (not logged-in or no account, empty identifier string)
  • or both.

However, if you're filling the identifier string with "unknown" our system will interpret this as a logged-in visitor.

Part 2: Targeting Your Surveys

After the code has been implemented, you can use the Identity feature in the Target Settings to target your survey at logged-in visitors, not-logged-in visitors, or both. 

If you choose "known" or "both" for your targeting option, any logged-in visitors who answer your survey will have their email address associated with their survey response. You will be able to see these email addresses when you export your survey data to CSV, or by clicking on the "Individual Responses" tab in the Reporting Interface.

The Identity feature is also used in the Whitelist and Blacklist feature - you can limit the survey to just a subset of registered visitors, or exclude a list of people who you don't want to see the survey.

Part 3: Tracking Additional Information About Your Visitors

If you have other properties you want to track for each visitor, please see the guide on Setting Additional User Properties. Any additional properties you track will also show up in the reporting interface, attached to the survey response each visitor sent.

Have more questions? Submit a request
Powered by Zendesk