A conversion is an action you want your website visitors to take, such as purchasing a product, signing up for a newsletter, downloading a brochure, or watching a video. You can define a conversion to be basically any variable in visitor behavior that you want to measure. What exactly you want to define as a conversion depends on your business goals.
What is conversion tracking?
Conversion tracking is the process of monitoring visitors for actions that qualify as conversions and collecting the data about those actions (conversion data). Conversion tracking also involves counting conversions and attributing them to modifications, which the Frosmo Platform does automatically when it receives conversion data from a site. The data is stored in the Frosmo back end.
Conversion tracking is essential for measuring the business performance of your site as well as Frosmo's impact on that performance. Conversion tracking is also a prerequisite for implementing features that rely on conversion data, such as generating recommendations and segmenting visitors based on the conversions they have completed.
Figure: Conversion tracking in the Frosmo Platform (click to enlarge)
For more information about conversions, conversion attribution, and conversion definitions, see the conversions user guide.
Transaction tracking is a subset of conversion tracking. For more information, see Tracking transactions.
Tracking conversions with the data layer
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.
Figure: Tracking conversions by triggering a conversion event from shared code (click to enlarge)
You can trigger conversion events from modifications, from shared code, or directly from your page code. If you use a modification, you trigger the events either from custom content or, if you're using a template, from the template content.
To use the data layer on a site, the data layer module must be enabled for the site.
Do not use conversion events to track product purchases. If you want to track conversions that involve the purchase of one or more products, use transaction events.
Triggering a conversion event
To trigger a conversion event, call the
dataLayer.push() function with a conversion object containing the conversion data:
The conversion object contains the data of a conversion event.
Table: Conversion object properties
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, and if you do not use the product ID as the conversion ID, the platform has no way of mapping the conversion to the corresponding product in the Frosmo database. For example, if you wanted to create a product recommendation based on the conversions, the recommendation engine would not be able to automatically map the conversions to products and would therefore fail to return the product data for the conversions.
If you're tracking a product conversion, use the product type as the conversion type. The product type is the same value you pass in the
Monetary value of the conversion (in the currency set for your 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
Testing the conversion tracking
To test that conversions are correctly tracked with the data layer:
- Go to the site.
- Enable console logging for Frosmo Core.
Go to a page where conversions are tracked. If conversion events are successfully triggered with the data layer, the browser console displays the following messages:
If you want more details on the data layer call, select the Network tab in the developer tools, and check the
buyProductrequests to the Optimizer API. If the status is
200, the request completed successfully.
Triggering a conversion does not trigger a product view nor a transaction event. Frosmo Core merely uses the
buyProductevents to pass the conversion data to the Frosmo back end.
To show only Optimizer API requests, filter the requests list by "optimizer".