Implementation validation

Using the Chrome DevTools Console, we can inspect network communication and other memory objects to check whether Roivenue Measurement was correctly implemented.

Check That Events Are Sent to the Roivenue Server

  1. Navigate to your website with Roivenue Measurement implemented.

  2. Open console (F12).

  3. Navigate to "Network".

  4. Make a page view or refresh the page.

  5. The network tab will contain many requests; you can filter them. Use "tr.roivenue.com/e/" to find Roivenue Measurement events.

  6. If the request status is equal to 200, everything is correct! If you see a different status, contact support for help.

To check if your persistence is set up correctly (respecting the consent settings), you can use the $rm_state object. This object contains a property called "persistence" which can have one of these values: "localStorage+cookie", "localStorage", "sessionStorage", "memory".

Let's assume you use the sessionStorage option when a user does not grant consent, and the localStorage+cookie with consent.

  1. Open your website in an anonymous window

  2. Open the console (F12)

  3. This time, select Console (instead of Network)

  4. Type in $rm_state

  5. persistence: 'sessionStorage' should be displayed

  6. Accept cookies

  7. Type in the $rm_state again

  8. persistence: 'localStorage+cookie' should now be displayed

First page view event

To accurately capture the source of a session, it’s essential to send the first page view event as soon as possible. This happens automatically if you don’t delay loading the tracking script for consent settings.

However, if you only start tracking users after they confirm their consent preferences, ensure that you trigger the Roivenue Tracking script using a "consent change" event. This ensures that Roivenue records the page view immediately after consent is given. Otherwise, tracking won’t begin until the second page is visited.

Last updated

Was this helpful?