Using the Identity API Call


Qualaroo allows you to identify website visitors logged in to your website with a powerful tool known as “Identity API.”


How does an Identity API call benefit you?

  • If your website has a login component, you can use API to push data to Qualaroo.

  • Qualaroo can use the data to open up various survey targeting options.


Watch this quick video guide about identity API:




In this article, you'll learn:


Part 1: Setting up the Identity Code

Part 2: Targeting Your Surveys

Part 3: Tracking Additional Information About Your Visitors

Custom Property + Identity API Call in SDK


 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 a second piece of code to be added after the main Qualaroo JavaScript on each page of your site.


Follow the steps to find the identity code on your site:


  1. Go to your Dashboard

  2. Click “Code Installed” or “Install Code.”

  3. Select “Paste code in website source code or GTM.”

  4. Click to enable the “Identify your nudge respondents” option.

  5. Scroll down, and you can find the following code that you should add to your site:


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


JavaScript Code


However, YOUR_IDENTIFIER_HERE should be replaced by a code that pulls the current visitor’s email address (or other identifiers) 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.


Please seek your developer’s help for the same.


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


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


Identification Call in PHP


NOTE: Our system knows that if it detects an empty identifier string, the visitor is “unknown.”


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 in 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 (known), not-logged-in visitors (unknown), or all visitors (both).


Enable Advanced Targeting: Identity Feature


If you choose “known” or “both” for your targeting option, any logged-in visitors who answer your survey will have their email addresses associated with their survey response.


Identity Feature


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 from the survey.


 Part 3: Tracking Additional Information About Your Visitors


Please see the Setting Additional User Properties guide if you have other properties you wish to track for each visitor. 


Any additional properties you track will also show up in the reporting interface, attached to the survey response each visitor sent.


Custom Property + Identity API Call in SDK


Set user properties




Using Identity API to target


The behavior of the survey display based on the targeting setting and whether setUserId has been called:


  • If targeting is set to “known”, the survey will be displayed when Qualaroo.getInstance().setUserId("HAL_9000") is called.
  • If targeting is set to “unknown”, the survey will be displayed when Qualaroo.getInstance().setUserId("") is not called.
  • If targeting is set to “both”, the survey will always be displayed regardless of whether Qualaroo.getInstance().setUserId("") is called or not.


Setting the user ID makes an entry in the report section under the Identity Column. This helps in tracking user responses to surveys and other user-specific data.


This is a sample preview. The actual view may vary.

Report preview of the Identity column


And that's it! If you encounter any issues or have any questions, don't hesitate to reach out to our support team



© 2005 - 2024 ProProfs