Disclaimer: This website requires JavaScript to function properly. Some features may not work as expected. 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

Wishlist page

Tracked by providing a list of all products in the wish list.

Name Description and usage
wishList Element containing wish list specific sub-elements
      items List of checkout items.
    refCode [String]

Product reference code.

A wish list page is tracked using the following script. The example shows a wish list with two items in total, PROD500 and PROD600.

{
      "type"     : "wishlist",
      "lang"     : "en-gb",
      "wishList" : {	 "items" : [		     { "refCode" : "PROD500" },		     { "refCode" : "PROD600" }	           ]       }
    }

If a user’s wish list is empty, the page is tracked using the following script.

{
      "type"     : "wishlist",
      "lang"     : "en-gb",
      "wishList" : {	 "items" : []       }
    }

📘

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