HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Migrate JavaScript API 1.3 to 1.4

Describes the changes between versions 1.3 and 1.4 of the JavaScript API.

JavaScript API version 1.4 replaces email address with a pseudonymized user ID in the tracking request.

Contact Optimizely to use JavaScript API version 1.4.

PeeriusCallbacks variable

You must add an additional parameter to the PeeriusCallbacks object. The parameter name is apiVersion and the value is v1_4. This overrides the default version 1.3 from the tracker script.

// this should be included in all pages
    var PeeriusCallbacks=
      { 
        ...
        apiVersion="v1_4"
      }

Tracking request

User ID

A user’s email and name are removed from the tracking request, as shown in the following examples.

"user": { "name": "[email protected]", "email": "[email protected]" }

They are replaced by a pseudonymized user id.

"user": { "id":"abcd1234efgh" }

📘

Notes

Optimizely Product Recommendations – To prevent user behavior from being lost, send Optimizely an up-to-date mapping between email addresses and pseudonymized user IDs. Provide this once so that Optimizely Recommendations can replace existing customer email addresses with their corresponding pseudonymized user ID.

Optimizely Email Product Recommendations – Provide your Email Service Provider (ESP) with an up-to-date mapping between email addresses and pseudonymized user IDs. Your ESP should create a new placeholder (mail merge variable) that represents the pseudonymized user ID. Then you replace the email address placeholder from all your Mail campaigns with this new placeholder.

Optimizely Triggered Messages – Your ESP must handle pseudonymized user IDs. Currently, in Triggered Messages, this functionality is provided only by Optimizely Campaign. Alternatively, you need to advise your ESP to provide an API extension that lets Optimizely call methods that accept the pseudonymized user ID instead of email address. Also, provide and maintain a mapping between pseudonymized user ID and customer email address that your ESP can use to lookup, to send the email to the appropriate customer based on their pseudonymized user ID.

(Legacy) Optimizely Promote – If provided, Optimizely Recommendations can use the visitor's IP address, within their session, to do a geolocation lookup to identify the approximate location of the visitor for a personalized online experience. IP addresses if provided will no longer be stored, so cannot be used for analytics and reporting.