Install the tracking code snippet into the footer of your application just before the </body> tag (this ensures the code will appear on each page, be the last to load, and have the least impact on performance). The tracking code contains custom variables you can pass to UserIQ from your application. This information will help you identify and target your users. Read more about custom variables.
Single page app install instructions (only applicable if you have a single page app):
To properly split the tracking code between a static footer and dynamic variables in a single page application (using Angular, for example), you will use the following tracking code in your footer (this can be a static JS resource):
STATIC JS INCLUDE
And you will set the variables in Angular.
You’ll notice that there are no user identification variables being passed in the code above. That’s because we’re going to pass those variables from Angular once the user is logged in.
Here is a working example of a user authentication service that sets the user variables as soon as the user is logged in:
DYNAMIC ANGULAR CODE
You can make this call anywhere in your application and it will establish the user as identified.
Upon successful installation of the code you will see the UserIQ bubble on the bottom right of your application, when you are logged in to both UserIQ and your application (you will need to be setup as an administrator in UserIQ to see this button). This button functionality is cookie based so please have cookies turned on. See an example of the button below.