Enhanced redirect analytics in Optimizely Web Experimentation

  • Updated
  • Optimizely Web Experimentation

Optimizely Web Experimentation has enhanced data tracking across origins for redirect experiments. The snippet stores information about the campaign decision in a cookie for tracking decisions on the post-redirect page to various analytics back ends.


Supported redirects and analytics integrations

Enhanced redirect tracking supports redirects from one origin to another within a single cookie domain and from one snippet to another, even between unlinked projects, as long as the two snippets are in the same account.

You may need additional configurations when redirecting from one snippet to another.

Enhanced redirect tracking also supports analytics tracking with:

Unsupported redirects and analytics integrations

Enhanced redirect tracking does not support redirects from one cookie domain to another.

Enhanced redirect tracking also does not support analytics tracking with Clicktale. If you use enhanced redirect tracking with Clicktale analytics tracking, you may not see any visitors in the redirect variation.

Third-party analytics and redirecting to a page with a different snippet

Optimizely does not include code for all possible integrations in every snippet, which would waste bandwidth and slow your page load time. Instead, Optimizely adds integration code to the snippet when you enable an integration for a project or experiment.

If you use a third-party analytics integration and redirect to a page with a different Optimizely Web Experimentation snippet in your account, the post-redirect snippet must have the analytics integrations enabled separately. If you intend to track the redirect experiment using a tool like Google Analytics, the snippet on the page you are redirecting to must also have the Google Analytics integration enabled. Because integrations are typically enabled on a per-experiment basis, this could mean the post-redirect snippet does not know about the redirect experiment and its integration settings.

Here are a few suggestions for working around this constraint:

  • Enable the integration for all experiments in the project where the post-redirect snippet lives (this option is not available for all integrations). If there is already an experiment running in that snippet that is using the integration, the redirect should work properly, although you might experience issues like another user pausing the test before yours is complete.

  • Create an A/A test for that post-redirect page's snippet where you use the Google Analytics integration

Debugging the redirect cookie

Append ?optimizely_log=debug to your URL and open the developer console in your browser. Search the log for a line containing Optly / Relay / Found redirect cookie that contains the cookie information. The cookie is set on the pre-redirect page, and the Optimizely Web Experimentation log reads and prints it from the post-redirect page.

If you parse the cookie information by & you can review the data passed from the pre-redirect page to the post-redirect page.

  • a – Account ID
  • aId – Activation ID
  • as – Audience IDs
  • cV – X Web client version
  • d – Decision ID
  • i – Visitor ID
  • isv – Integration service version. Indicates the analytics naming convention.
  • l – Campaign ID
  • lN – Campaign name. Unavailable if masking descriptive names.
  • lP – Campaign policy
  • n – Snippet revision
  • nslocalStorage key namespace
  • p – Project ID
  • r – Referrer. Empty string if the referrer couldn't be determined on the pre-redirect page.
  • s – Session ID
  • t – Time since Unix epoch. Use a converter if you want a more readable timestamp.
  • v – Variation ID
  • vN – Variation name. Unavailable if masking descriptive names.
  • x – Experiment ID
  • xN – Experiment name. Unavailable if masking descriptive names.

Third-party analytics

If you are expecting results with supported third-party analytics integrations, make sure the integration is included in the post-redirect snippet even though the integration may not be explicitly enabled for any campaign or experiment in that snippet.