Product Page Functions
  • 29 Dec 2023
  • 1 Minute to read

    Product Page Functions


      Article Summary

      You can call these predefined functions where applicable when creating a custom campaign, rule or goal.

      Getting the categories of a product page

      The following function gets the category tree of the current product page. 

      Function CallReturns
      Insider.systemRules.call('getProductCategories')Array
      Insider.systemRules.call('getProductCategories')

      For example, the below response returns all categories the current product page has.

      Getting the product information

      The following function gets the product information from the product page.

      Function CallReturns
      Insider.systemRules.call('getCurrentProduct')Object
      Insider.systemRules.call('getCurrentProduct')

      For example, the below response returns the product information of the current product page.

      Detecting the product page

      The following function detects if the current page is the product page.

      Function CallReturns
      Insider.systemRules.call('isOnProductPage')Boolean
      Insider.systemRules.call('isOnProductPage')

      For example, the below response returns if the current page is a product page.


      Was this article helpful?

      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses