To use the data layer on a site, the data layer module must be enabled for the site.
For an introduction to conversions and conversion tracking in the Frosmo Platform, see .Data tracking overview v9.1#Conversion tracking.
Tracking conversions with the data layer means triggering a conversion event whenever a visitor successfully completes an action that qualifies as a conversion. The data you pass in the conversion event defines the conversion.
- Page code (meaning directly from your the site source code)
- Shared code
Page code is the recommended solution. If you cannot use the data layer in your page code, use shared code.
If you're tracking a product conversion, use the product ID as the conversion ID. The product ID is the same value you pass in the
If you're tracking a product conversion, use the product category as the conversion type. The product category is the same value you pass in the
Monetary value of the conversion (in the currency set for your the site).
If you're tracking a product conversion, this property should not reflect the product price, but rather some other monetary value associated with the conversion, as this property does not map to any product data.
If you want to track a purchase-based product conversion, trigger a transaction event instead.
If you're tracking a product conversion, use the product name as the conversion description. The product name is the same value you pass in the
Conversion object examples
Testing conversion tracking
To test that conversions For instructions on how to test that conversions are correctly tracked with the data layer:
Select Advanced > Events.
Go to a page where conversions are tracked. If conversion events are successfully triggered with the data layer, Frosmo Preview shows the following messages for each event:
conversion(contains the conversion data parsed from the conversion object)
dataLayer(contains the object passed to the data layer)
trigger.event(contains information about the triggered event, including the object passed to the data layer)
To verify that the correct conversion data was sent, check the
If you want more details on a data layer call, select the Advanced > Requests view in Frosmo Preview, and check the
buyProduct requests to the Optimizer API.
on a site, see .Testing data tracking v11.4#Conversion tracking.