Google Optimize | Bi-directional

Integrating SessionCam with Google Optimize is the best way to understand the qualitative impact of your tests because it ensures you get a holistic view of the customer's experience. Setting up this integration will allow you to do a number of things and some of these include:

  • Segment your recordings using variants as a filter
  • Compare customer struggle scores between variants and the control
  • Use heatmaps to get a clear understanding of how variants impact UX at a page level
  • Go directly to your Google Optimize experiment page from SessionCam data

Send your Google Optimize Data to SessionCam

To integrate SessionCam with Google Optimize with Sessioncam, please deploy the code below at the bottom of every page on your site after the SessionCam tag.

gtag('event', 'optimize.callback', {
  callback: function callback(combination, experimentId, containerId) {
    if (!window.sessioncamConfiguration)
      window.sessioncamConfiguration = new Object();
    if (!window.sessioncamConfiguration.customDataObjects)
      window.sessioncamConfiguration.customDataObjects = [];
    var item = {
      key: "Google Optimize Experiment",
      value: experimentId + "?containerId=" + containerId + "&combination=" + combination

The value is structured as part of a Google Optimize URL eg vzIUgD54TSebQctxRUDPuA?containerId=GTM-K67NNDB&combination=0. So if you wanted to go directly to the variant in your Optimize console you can put in front, so for this example.

Send your SessionCam data to Google Optimize

 If you have set up our one way Google Analytics integration you will be able to pull your SessionCam SessionID’s through to Google Optimize once you have linked your Google Analytics Property to your Optimize Container. Here is a Google Help Center article if you need assistance with this 


How to filter by the values in SessionCam

You can also filter for any sessions that have seen the variable (including its value) by following the instructions below:

Field Value, FOR, Google Optimize Experiment, LIKE, and then your Experiment ID and CombinationID, eg 'vzIUgD54TSebQctxRUDPuA 0' for the experiment id of vzIUgD54TSebQctxRUDPuA and the combination id of 0


  • Create an Export. In the export use the segment you just created and in the Fields to export (section 2) add "Google Optimize Experiment" as the field.

When you create the CSV file from the export you’ll see the value under the “Google Optimize Experiment” column. If you wanted to go directly to the variant in your Optimize console you can put in front to cross reference the two data points.