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.
Transaction tracking is a subset of conversion tracking. If you want to track conversions that involve the purchase of one or more products, use transaction tracking. For more information, see Tracking transactions.
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)
Conversion tracking generates conversion and modification statistics, which you can view in the Frosmo Control Panel.
For more information about conversions:
- For an extended introduction, and for information about conversion attribution, see Introduction to conversion tracking.
- For instructions on how to implement conversion tracking for a site from the Control Panel, see Creating and managing conversion definitions.
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.
To use the data layer on a site, the data layer module must be enabled for the site.
You can trigger conversion events from:
- Modifications (either from custom content or, if you're using a template, from the template content)
- Shared code
- Page code (meaning directly from your site source code)
If you're only triggering conversion events, and not displaying any content, use shared code instead of a modification.
Figure: Tracking conversions by triggering a conversion event from shared code (click to enlarge)
Triggering conversion events
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
Conversion object examples
Testing 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 for each event:
EASY [conversion] log:: Conversion sent with the product type "<conversionType>" and product name "<frosmoConversionName>"
EASY [events] info:: conversion(contains the conversion data parsed from the conversion object)
EASY [events] info:: dataLayer(contains the conversion object passed to the data layer)
The following figure shows an example of the conversion event messages.
If you want more details on a 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.