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 8.0

...

This document

...

shows you how to use the

...

data layer (window.dataLayer

...

) to collect product and visitor data from a site

...

.

Table of Contents

Info

Implementing different types of data tracking with window.dataLayer is an alternative to Frosmo developers implementing that same the tracking in the Frosmo custom script.

...

.

Table of Contents

What is the data layer?

The data layer is a global JavaScript array that allows you to pass data from a web page to the Frosmo JavaScript library. The library then sends that data to the Frosmo back end, where the data is stored in a database. The library can also use the data directly in the browser to, for example, display content or manage segmentation. The exact behavior depends on how the Frosmo Platform is configured for your site.

...

  • Collect product data from the site through product tracking.
  • Collect visitor data from the site through conversion, custom action, product, or and transaction tracking.

The data layer is based on the Google data layer implementation. If your site already implements the data layer to pass data to Google Tag Manager, the Frosmo JavaScript library will use that same data layer. Any data you push to the data layer will pass to both the Frosmo JavaScript library and Google Tag Manager, the latter of which sends the data to Google Analytics.

The Frosmo JavaScript library sends the data to the Frosmo back end only if the data conforms to one of the allowed data models. Pushing incorrectly structured data to the data layer does not break or disrupt the Frosmo Platform in any way. The platform simply ignores invalid data.

The following figure shows you where the data layer fits in in the in the Frosmo Platform architecture. For more information about the architecture, see Technical overview. Google Analytics is only involved if your site uses Google Tag Manager.

...