Pages

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

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 means counting conversions and attributing them to modifications.

Conversion tracking is essential for measuring both the business performance of your site and 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.

Conversion data is stored in the Frosmo back end.

## FIGURE ##

Figure: Conversion tracking in the Frosmo Platform

For more information about conversions, conversion attribution, and the different ways of tracking conversions, see:

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 completes an action that qualifies as a conversion. The data you pass in the conversion event effectively defines the conversion.

## FIGURE ##

Figure: Tracking conversions by triggering a conversion event with the data layer

You can trigger the conversion event from a modification, from shared code, or directly from your page code. If you use a modification, you trigger the conversion event 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 dataLayer.push() with a conversion object:

dataLayer.push({
    conversionId: 'string',
    conversionType: 'string',
    conversionValue: 0,
    frosmoConversionName: 'string'
});

The call triggers the event and sends the conversion data to the Frosmo back end.

Conversion object

The conversion object describes a conversion event. The object properties together define the conversion data.

Table: Conversion object properties

PropertyDescriptionTypeRole
conversionId

Conversion ID.

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 frosmoProductId property of a product object when tracking products.

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.

String (128)Required
conversionType

Conversion type.

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 frosmoProductCategory property of a product object.

String (128)Required
conversionValue

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.

NumberRequired
frosmoConversionName

Conversion description.

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 frosmoProductName property of a product object.

String (128)Required

Examples

Example: Triggering a conversion event
dataLayer.push({
    conversionId: 'download_1',
    conversionType: 'Download',
    conversionValue: 0,
    frosmoConversionName: 'Trial software download'
});
Example: Triggering a product conversion event
// Set the product data variables...

dataLayer.push({
    conversionId: productId,
    conversionType: productType,
    conversionValue: 0,
    frosmoConversionName: productName
});

Testing the conversion tracking

To test that conversions are correctly tracked with the data layer:

  1. Go to the site.
  2. Enable console logging for Frosmo Core.
  3. Go to a page where conversions are tracked. If conversion events are successfully triggered through the data layer, the browser console displays the following message:

    ## SCREENSHOT ##

  4. If you want more details on the data layer call, select the Network tab in the developer tools, and check the setProductData request to the Optimizer API. If the status is 200, the request completed successfully.

    ## SCREENSHOT ##

    To show only Optimizer API requests, filter the requests list by "optimizer".