Track User Identifier for Mail Advisor and Behavioural Triggers

Thomas Garp -

Raptor is using its own user identifier to track users, but when you plan to implement mail recommendations or behavioural triggers, like abandoned card, you will need to identify the user with an Id that is known by both the website AND the email marketing system.

There are several ways you can send the userid to Raptor:

 

Send userid with a parameter in the URL

The Raptor script will track userid's coming from the url address. Pr default, the Raptor script is listening for a parameter called "ruid". So you can send the userid to the raptor script like this:

http://www.yourwebsite.com?ruid={youruserid}

This is typically set up in the email marketing system, so all links pointing to the website in the email has the ruid parameter in the url.

If you already have the userid in the url, but with a different parameter name, you can set up our script to listen for that particular id in stead:

<script type="text/javascript" language="javascript">      
var raptorLoaded = function (raptor) {
raptor.initialize(
{ customerID: "{YOURCUSTOMERID}",
productIdParamIndex: 2,
eventTypeParamIndex: 1,
userQueryParamName:"{NAMEOFUSERIDPARAMETER}");
}
</script>



Send userid to Raptor with the raptor.addUser() javascript API function

Another way of feeding Raptor with userid's is by using a special method in our tracking API, called addUser.

 

<script type="text/javascript" language="javascript">

    var raptorLoaded = function (raptor) {
    raptor.initialize(...); // See Documentation
    
raptor.addUser({YOUR USER IDENTIFIER HERE}); } </script>

Typically you will call addUser whenever the user id is available, for instance

  • When user logs in
  • When user checks out in payment flow
  • When user signs up to a newsletter

 

You can use any id you may like, however, it is vital that your email marketing system uses the same id.

We recommend using a proprietary id, however in some cases your best choice is to use an email address, which might be the only id that is known across platforms.

Raptor encrypts all data, so emails will not be stored in clear text. 

If you choose to use the email address, please read our article about how to protect email adresses from being tracked by Google.

FAQ

Can I call raptor.addUser() multiple times?

Yes, it will only add the same user once. Whenever you have the userid available, call addUser()

Should I use raptor.addUser() or ruid or both?

You can use both, it will have the same effect. Many customers prefer to just append the userid in the url, in stead of calling the addUser, but you can choose freely which method to use.

Have more questions? Submit a request

Comments

Powered by Zendesk