Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Install tracking via Tag Manager

Explains how to install the tracking JavaScript via your Tag Manager solution.

📘

Note

When you install tracking via the corresponding NuGet package, it will result in double tracking, and you should set the episerver:personalization.content.DisableDefaultTracking key to true.

Add the tracking script

The tracking JavaScript tag triggers an API call to track visitor activity with that URL. You can validate the tracking script after you install the tracking JavaScript through a tag management system or include it in the header via the content management system.

📘

Notes

  • The script is in your Content Recommendation Portal. Go to Content > Properies > Web Properties > Web Tracking > Tracking JavaScript.
  • The tracking API call is made asynchronously to have no effect on web page performance
  • Tracking JavaScript tracks users anonymously and does not collect personally identifiable information.

Cookie usage in Content Recommendations

Tracking JavaScript uses the following performance cookies.

Cookie NamePurpose
ivTracks the anonymous visitor's actions across the site. This is a persistent cookie.
isIdentifies a visitor's session. This cookie is used in conjunction with the iv cookie, and is erased when the visitor closes the browser.

See Optimizely Platform Cookies for information about other cookies in the Optimizely platform.

Example

The following example uses Google Tag Manager, but you can use any other tag management solution.

  1. Your Optimizely onboarding representative emails the tracking script to you.
  2. Log in into Google tag manager (or other tag manager).
  3. Paste the code provided by Optimizely into the (Google tag manager) HTML section. (Your tag manager may have a different field.)

📘

Note

To install Optimizely Content Recommendations through Optimizely Content Management System (CMS) or by manually editing a page, copy and paste the code into the tracking code section of web.config, or the  section of your web page.

1546
  1. Click Save to publish the container.

Related blog post: Implementing Idio (Optimizely) analytics and content recommendations on an  Episerver (Optimizely) site  - David Knipe