Implement Roivenue ID
Unlock Roivenue's data-driven attribution and uncover reality. Roivenue ID helps us to track and build your customers journey precisely.
Start with importing the container with the Roivenue client ID into GTM.
- 1.Open Google Tag Manager and choose the desired account you want to import GTM into.
- 2.Go to the Admin tab and click "Import Container"
3. Click on "Choose Container file" and import the "EnhancedAttribution.json" file, which you can download below, into GTM.
4. Choose Existing workspace(and the workspace, where you actually want to implement Roivenue ID) > Merge > Overwrite conflicting tags, triggers and variables
5. If your preview looks like this, then hit confirm
The file you imported is just a template. To make it work, insert your property ID in the .json file by:
- 1.Going to the workspace, where you imported the file and clicking on "Variables"
- 2.Opening the variable called "aac.config.roivenue"
3. Inserting your property ID into the indicated area between the single quotation marks.
4. Submit your changes to the Variable.
- 1.Go to the "Tags" section and configure all of your "Universal Analytics" tags.
- 2.Click on "Enable overriding" > "More settings" > "Custom dimensions".
- 3.Set 2 new custom dimensions on indexes 19 and 20
- 1.On 19th aac.roivenue.client
- 2.On 20th aac.roivenue.id
- 4.The final tags adjustment will look like this:
5. Submit the changes.
The last step of implementation of Roivenue ID consist of setting up the custom dimensions in your Google analytics account.
- 1.Select the property you imported the GTM container into.
2. Go to Admin > Custom Definitions > Custom Dimensions
3. Set "Roivenue client - session" on 19th position and "Roivenue client - hit" on 20th custom dimension.
How to Create a New Dimension
- 1.To set up custom dimension click on "New custom dimension"
- 2.Name it accordingly - "Roivenue client - session" or "Roivenue client - hit"
- 3.Choose "Session" or "Hit" scope and make it active
- 4.Hit Save
4. The final settings will look like this:
5. After the dimensions are set up, the GA setup process is finished. Be sure to test that the data is sent correctly into the two dimensions and that they are being decoded properly in Roivenue.
Some browsers and especially Safari one has some restrictions to cookies. Meaning, after some short time the browsers are removing even 1st party cookies which are not http.
To avoid that problem and make processing in Roivenue more precise you must take our cookie and replicate it on backend into http cookie. More detail description of process follows.
We are saving client ID into cookie with name "_ranaCid".
With every request on your backend server, you must take this cookie (if it is existing) and copy its value into https cookie named "_ranaCidBE".
"_ranaCidBE" must have these parameters:
- HttpOnly = true
- Secure = true
- Expires = “Mon, 31 Dec 2099 23:59:59 GMT”
But don’t copy this value every time. Priority should be on your backend one. If cookie _ranaCidBE is already existing, let's keep its value like it is. Just in case if _ranaCidBE is not existing copy value from _ranaCid.
And you must push _ranaCidBE value into dataLayer. Which is done by this simple script, which needs to be executed on the page before GTM initialisation.
window.dataLayer = window.dataLayer || ;
'RoivenueClientId' : 'xxxxxxxxxx' //Just change xxxxxxx value on value from _ranaCidBE.