# 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.&#x20;
6. If the request status is equal to 200, everything is correct! If you see a different status, contact support for help.

<figure><img src="https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGvvrlVUvq4TNL0oYP6%2Fuploads%2Fwm5KnQf2yTnHYwho8J7S%2Fimage.png?alt=media&#x26;token=2938e636-7d94-4be1-b362-524f94bae667" alt=""><figcaption></figcaption></figure>

### Check Consent Settings

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".

<figure><img src="https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGvvrlVUvq4TNL0oYP6%2Fuploads%2FkwIgUqbPv3pEGthLyYk5%2Fimage.png?alt=media&#x26;token=f6fc7445-4761-4cf0-a7f6-ba60e1cd9016" alt=""><figcaption></figcaption></figure>

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

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

{% hint style="danger" %}
This behaviour can differ based on your consent strategy!
{% endhint %}

{% hint style="warning" %}
If this is your first time using Console, you will be prompted to type in "allow pasting" (if you want to copy and paste the value).
{% endhint %}

<figure><img src="https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGvvrlVUvq4TNL0oYP6%2Fuploads%2FG4Ro6NYk3zsA9Fg8ULqA%2Fimage.png?alt=media&#x26;token=a2dd3491-1abd-4916-886b-aae986c72d63" alt=""><figcaption></figcaption></figure>

### 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.

<figure><img src="https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGvvrlVUvq4TNL0oYP6%2Fuploads%2FlE9fNqeNdXJ3UALpDJaF%2Fimage.png?alt=media&#x26;token=a25e2dc7-17eb-450e-9d27-85589bc16a9b" alt=""><figcaption></figcaption></figure>
