Pages

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 14.0

...

You can call dataLayer.push() directly from your page code or from shared code.

The following example shows you how to push a conversion object to the data layer. The call triggers a conversion event and sends the conversion data to the Frosmo back end. Tracking conversions essentially means making similar calls across your site whenever a visitor does something that you want to track as a completed conversion.

...

Here's an example workflow of product tracking that feeds into generating the data for a recommendation:

  1. A visitor navigates to a product page.
  2. Your code on the product page calls dataLayer.push() with the product data, which the code scrapes from the page or fetches from an external source, such a product database or feed. The call triggers a product view event.

    Tip

    Since the purpose of product tracking is to both collect product data and register product views, the dataLayer.push() call could be placed at the end of the page source code or triggered only after the DOM is ready so as to ensure that the page content first gets rendered for the visitor.


  3. The Frosmo JavaScript library catches the product view event and the product data.
  4. The Frosmo JavaScript library sends the product data to the Frosmo back end, where the platform stores the data in the product database.
  5. The platform registers the data push as a view for the product, incrementing the product view count by one.
  6. You create a recommendation strategy for, for example, most viewed products.
  7. The Frosmo Recommendations engine uses the recommendation strategy, along with the collected product data and the product view counts, to generate the recommendation data.

...