This post describes how to add Optimizely Data Platform (ODP) to Optimizely Commerce Cloud. While written with Optimizely Commerce Cloud in mind, it can be used as a basis for tracking on any commerce solution, not specifically an Optimizely Commerce Cloud solution. The Optimizely Data Platform allows clients to collect and aggregate customer data in real time, segment and analyse it and take action on it using automated AI insights. The Optimizely Data Platform (ODP) was previously known as Zaius. Learn more about the Optimizely Data Platform here.

The following steps are required to add Optimizely Data Platform (ODP) to a site:

  • Install the Optimizely Data Platform (ODP) standard tracking
  • Track commerce site events
  • Send order confirmations via API

Install Optimizely Data Platform standard tracking

This is a standard piece of Javascript tracking that adds page view tracking to every page on a site. This is a script that needs to be included on site and it's possible find the details of the script in the Optimizely Data Platform UI here:

For the eagle eyed you can see that yes, Optimizely Data Platform as part of Optimizely Intellegence Cloud can work with other commerce solutions :)

Track commerce site events

For the purpose of this post I am adding standard page view tracking with default events for things like product views, add to basket etc. The specific implementation of this will depend on your site tracking and Javascript implementation on the site. I am going to track the following standard events in Optimizely Data Platform:

  • Page view
  • Product view
  • Add to basket
  • Remove from basket
  • Add to wishlist
  • Remove from wishlist
  • Check out started
  • Check out complete
  • Order Confirmed (see "Send order confirmations" below)

There are some other standard events and it's also possible to easily extend with custom event types. Find out more about the core concepts for standard and custom events in the Optimizely Data Plaform here and in the web events SDK information here.

For convenience I have written a script that can be added to a Foundation site to track the standard commerce events: view the Optimizely Data Platform tracking script for Foundation here. Is is specific to Foundation but shows the events being sent to the Optimizely Data Plaform.

Send order confirmations

Due to concerns around ad blockers it is recommended to use the Rest API to send order confirmation data to the Optimizely Data Platform as this ensures the data is received. Read more about the order Rest API here. The code that sends order purchase confirmations for a Foundation site can be seen here. It is intended to serve as an example and not be production ready as the properties being sent may vary depending on custom fields added in Optimizely Data Platform and/or Optimizely Commerce Cloud.

It should be noted that the example code has a "[ODP API KEY LIVES HERE]" placeholder for the API key. This can be found in the Optimizely Data Platform UI as shown below:

Additional integration considerations

It should be noted that there is a standard connector in development that is a part of Optimizely Data Platform to connect to Optimizely Commerce Cloud. This connector allows ODP to retrieve customer, order and product data from Commerce Cloud and will be available to clients shortly. The connector is a standard part of Optimizely Data Platform and only needs configuration. It's visible in the UI below:

If enabled in your instance it can be found in Optimizely Data Plaform UI in the App Directory:

The Commerce Cloud part of the integration uses the Service API so doesn't require any custom implementation apart from installation of Service API into the solution.

If you are interested in testing the Optimizely Data Platform connector for Commerce Cloud before it's official release please get in touch with your local Optimizely office or your customer success manager.

Learn more about Optimizely Data Platform

Some further reading about Optimizely Data Platform can be seen below:


The Optimizely Data Platform is a hugely powerful tool that adds customer data platform capabilities to your solution. It's easy to get started as described in this post and sits at the heart of the Optimizely Digital Experience Platform.

I am happy to hear your feedback in the comments below or on @davidknipe.


Recommendations for you