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

Home page

Typically the first page seen by a user when they enter your website.

The home page is tracked with the following script:

{ 
      "type"    : "home",
      "lang"    : "en-gb",
      "channel" : "web", 
      "user"    : {
        "id":"abcd1234efgh"
      } 
}

📘

Note

This example includes the user parameter to supply a user ID. This is included for illustration only and may not be available on the homepage.

Provide this request only once per session; it typically supplied on the next page load following a customer login.

📘

Note

You can also add the customAttributes or customer elements to this page tracking request. For more information, see Add customAttributes or customer elements (Optional).