Verifying the SDK Implementation

This article provides instructions on how to test and confirm your SDK implementation. Please make sure all the steps below have been followed.

If a test fails to show the expected results, please contact your Customer Success Manager.
Please make sure to use incognito mode and clear cache and website data before getting started.


Step One: Verify SDK Initialization

SDK Files

To perform the test, visit or reload a page on your website where the SDK has been implemented on.

Then, go to Dev tools > Network > filter to SDK.

Expected test results:
The SDK file "?tenant_id=XXX" appears, where ‘XXX’ is the tenant id provided to you by Optimove.

\### Optimove SDK metadata

Optimove SDK metadata

To perform the test, enter your website.

Then, go to Dev tools > Network > filter to stream

Expected test results:
optimove_sdk_metadata event fired when entering the website
This default event generated by the SDK to capture UTM parameters will fire when first landing on your website.



Step Two: Verify Core Events (Web SDK V3)

"pageVisit" event - visitors

To perform the test, navigate between different pages on your website.
Then, go to Dev tools > Network > filter to Optimove.

Expected test results:

  1. pageVisit event is reported to realtime on every page
  2. pageVisit event is reported to stream on every page
  3. URL and Title parameters are populated
  4. URL is valid
  5. Visitor ID is populated and consistent until setUserId is called

If the website is a Single Page Application (SPA) or semi Single Page Application, ensure pageVisit is reported when the page isn't reloaded. This can be implemented using the History Change trigger in GTM.

"registration" event

To perform the test, register to your website. Then, go to Dev tools > Network > filter to Optimove.

Expected test results:

  1. set_user_id_event is reported to stream after registration
  2. set_user_id_event is reported in realtime after registration
  3. registration event is reported to stream after registration
  4. registration event is reported in realtime after registration
  5. CID: "SDK_ID" (the customer ID sent to Optimove in the daily)
  6. If the 'email' parameter has been configured, make sure it is populated.
  7. Parameters configured as part of events are correctly populated

Make sure to test all registration points on your website.
The 'email' parameter is necessary to send an email campaign.

"pageVisit" event - existing customers

To perform the test, navigate between different pages. Then, go to Dev tools > Network > filter to Optimove.

Expected test results:

  1. pageVisit event is reported to realtime on every page
  2. pageVisit event is reported to stream on every page
  3. CID: "SDK_ID" is populated
  4. Visitor ID will change to updated visitor ID

login event

To perform the test, log in to your website. Then, go to Dev tools > Network > filter to Optimove.

Expected test results:

  1. set_user_id_event is reported to stream after login for the first time
  2. set_user_id_event is reported in realtime after login for the first time
  3. login is reported in real-time after login
  4. login is reported to stream after login
  5. CID: "SDK_ID" (the customer ID sent to Optimove in the daily)
  6. Visitor ID will change to updated visitor ID

Please note:

If the client has previously logged in and the ID is saved to local storage, it will not see the set_user_id_event event fire; it will only log in.

The set_user_id_event will be shown whenever an event has been sent, including a customer ID, and the customer ID is not saved in the local storage.


Step Three: Verify Events Are Flowing Into Optimove

Successful events

To perform the test, go to the events log page in your Optimove site and record all events.
Please note, only admin users can access this page.

Go to your Optimove site > Settings > Events > Events Logs.

Expected test results:

  1. Events fired on your website are flowing into the event log page.

Failed events

To perform the test, go to the events log page on your Optimove site.
Please note that only admin users can access this page.

Go to your Optimove site > Settings > Events > Events Logs.

Expected test results:

  1. No failed events