This document is for developers who want to use the public
window.dataLayer array to pass data from a site to the Frosmo back end.
If you're a Frosmo developer working with a Frosmo custom script, use the
easy.dataLayer module of the Frosmo Core library instead. Do not use the
window.dataLayer.push() function in the custom script.
Implementing different types of tracking with
window.dataLayer is an alternative to Frosmo developers implementing that same tracking in the Frosmo custom script.
This document shows you how to use the data layer to collect product and visitor data from a site by tracking conversions and transactions, custom actions, and products.
What is the data layer?
You can use the data layer to:
- Collect product data from the site through product tracking.
- Collect visitor data from the site through conversion, custom action, product, or transaction tracking.
The following figure shows you where the data layer fits in 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.
Figure: Data layer in the Frosmo Platform
Why use the data layer?
You want to send data from your web page to the Frosmo back end. The data may or may not be part of the DOM. The data may be scattered across the page content in HTML elements, it may be metadata stored in the page header, or it may be session data about the visitor. Reading the data from the page would require dedicated solutions for the different pieces. Moreover, if the data structures on the web page change, the solutions are rendered unreliable or obsolete.
Where to go next
Learn how to enable and disable the data layer module for your site. To use the data layer with the Frosmo Platform, the data layer module must be enabled for the site.
Learn the basics of using the data layer to collect data.
Learn how to track conversions and transactions with the data layer.
Learn how to track custom actions with the data layer.
Learn how to track products with the data layer.