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

Product page

Tracked by providing the reference code of the product.

📘

Note

Ensure the product code matches the code supplied in the catalog feed.

NameDescriptions and usage
productProduct reference code – Includes a refCode property, with the value of the product reference code string.

The product page is tracked using the following script:

{ 
      "type"    : "product", 
      "lang"    : "en-gb", 
      "product" : { "refCode" : "PROD500" }
    }

If you want the callback to contain only the ref-codes (rather than default full product details) for recommended products, use the recContent parameter to specify refCodeOnly. See Recommendations callback.

{ 
      "type"       : "product", 
      "lang"       : "en-gb",
      "recContent" : "refCodeOnly",
      "product"    : { "refCode" : "PROD500" } 
    }

📘

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).