In some cases, it might be beneficial to call Raptor’s tracking service directly without utilizing Raptor’s Clientside Tracking script. Calling the tracking service directly allows you to track user behavior in environments where Javascript can’t be used.
To call the tracking service directly, you simply need to send a GET request to a URL. The GET request must include all of the necessary tracking parameters. The URL has the following format:
Note that the URL above has been shortened for readability purposes.
Parameter Explanation
Parameters p1-p999 |
These parameters contain data from the website (ie, eventtype, productid, categoryid, etc) The parameters can differ from customer to customer, and you can find the exact list of parameters to be inserted in the controlpanel. |
coid |
Cookie id. A GUID, which is unique per user. Must be send at every page request. This id is important for the personalization modules in Raptor. |
sid |
Session Id. A GUID, which is unique per session. Must be send at every page request. This id is important for the performance measuring KPI's in Raptor. |
ruid |
A base64 encoded userid (for instance, the email address). This id is sent when available |
NB: All Parameters must be URL encoded.
What kind of Cookies should I use?
“Raptor Cookie”
We need a cookie identifying the device/browser. The lifetime is 1 year since the last tracking (it needs to be set each time). The cookie lifetime should be renewed each time the user visits the website. The value is a Guid (uuid v4). The value needs to be attached to every tracking sent to our server.
Session Cookie
We also need a cookie specifying the session for a user – to know which behavior is performed by the user – within a session. The lifetime is “a session”, which normally means until the browser tab is closed or maximum 20 minutes from the last visit. This means that each time a user visits a page, you should set the timeout to 20 minutes. If the next visit is within 19 minutes of the first visit, it is within the same session. This also means that a user who visits every 19 minutes during a day (which is unlikely) only has one session. The value is a Guid (uuid v4).
RuId
RuId (Raptor UserId) identifies a particular user. If the User identifies himself with an email-address at some point, you should also save this to a cookie. This cookie needs to be set each time a user identifies with an Email Address. It’s ok to override the previous value. This normally happens when the user signs up to a newsletter – or during the Check-out flow. It’s ok to gather the email as soon as the user enters it – we will not send out any emails without checking for permissions in the Email Marketing System. The RuId needs to be attached to every tracking sent to our server. The lifetime is 1 year. We do not encourage you to save the email address in clear text in the cookie.
🔍Note: If the Email Marketing System and the CMS share an identifier, that is not the Email Address – then it’s okay to send this as RuId, if it’s possible for us to use the Email Marketing System to start a send-out using this identifier.
ReaId
ReaId (Raptor Email Address Id) is used when we have an integration with the Email Marketing System.
This is an arbitrary Id created by our server that represents the email address of the user.
This is sent via the QueryString as “reaid=”
You must create a cookie – with a lifetime of 1 year – each time there’s a “reaid” in the querystring and the value needs to be attached to every tracking sent to our server.
It’s not necessary to encode the value because it’s not unsafe data. It’s just an Id.
The ReaId and RuId should be used together:
The ReaId is set from the Querystring when the user clicks a newsletter, which points to a landingpage on the site. And the RuId should be set when the user signs up to a newsletter or starts the checkout-flow. By using both these approaches together, we increase the number of convergence points, which increases the personalization of our algorithms.
XuId (only for HeyLoyalty clients)
XuId (eXternal User Id) is a specialized identifier, used only for HeyLoyalty customers.
This can NOT be used together with ReaId and RuId. This is sent via the QueryString as “xuid=”
You must create a cookie – with a lifetime of 1 year – each time there’s a “xuid” in the querystring and the value needs to be attached to every tracking sent to our server.
It’s not necessary to encode the value because it’s not unsafe data. It’s just an Id.
Important
All cookies must be set on the top-level-domain ie: .shopname.com - NOT including the subdomain www.shopname.com or basket.shopname.com
All Parameters must be UrlEncoded.
Other Ids
If you have a UserId available on the website, we encourage you to track this. It’s doesn’t require a cookie – from Raptor’s point of view, but normally when you have a login on a website, you also would have a soft-login cookie (“remember me”) functionality.
So, if the user is logged in, set the UserId parameter (P7).
Add Click-Tracking(only for Web Advisor Implementations)
In order to track users interacting with the Raptor recommendations, you need to call our tracking service with the event type ItemClick and an additional parameter including the recommendation module name.
See GET request below: https://t.raptorsmartadvisor.com/[customerid].rsa?p1=itemclick&p2=[p2]....&p999=[p999]&coid=[cookieId]&ruid=[base64UserId]&sid=[sessionId]&am=[modulename]
This allows Raptor to understand how the user interacts with the recommendations and helps attribute revenue to each individual Recommendation module.