HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Product page

You can track a product page by providing the product's reference code.

NameDescription and usage
productProduct code – Includes a refCode property, with the value of the product reference code string. The refCode must exactly match the refCode (guid) specified in the product catalog feed. Also, if you have a custom feed, contact your Optimizely Customer Success manager to find out which field from the feed is used as a product identifier.

Product page tracking request example.

{ 
      "type"        : "product",
      "ip"          : "10.42.37.139",
      "session"     : "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
      "cuid"        : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O",
      "site"        : "retailer",
      "clientToken" : "1234abcd5678",
      "channel"     : "web",
      "lang"        : "en-gb",
      "currentURI"  : "www.retailer.com/product/RC123.html",
      "previousURI" : "www.retailer.com/home",
      "userAgent"   : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",  
      "product"     : {
                        "refCode" : "RC123"
                      }
    }

If you want the returned recommendations to contain only product codes for recommended products, use the recContent parameter and specify refCodeOnly (see Product Recommendations response).

{  
      "type"        :        "product",
      "ip"          :  "10.42.37.139",
      "session"     :  "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
      "cuid"        :  "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O",
      "site"        :  "retailer",
      "clientToken" :  "1234abcd5678",
      "channel"     :  "web",
      "lang"        :  "en-gb",
      "currentURI"  :  "www.retailer.com/product/RC123.html",
      "previousURI" :  "www.retailer.com/home",
      "userAgent"   :  "Mozilla/5.0  (Windows  NT  10.0;  WOW64)  AppleWebKit/537.36  (KHTML,  like  Gecko)  Chrome/56.0.2924.87  Safari/537.36",
      "recContent"  :  "refCodeOnly",
      "product"     :  {
                         "refCode":  "RC123"
                       }
    }