Pages

For an introduction to advanced tracking and custom events, see Data tracking overview.

You implement advanced tracking with a Frosmo Core function in modification content or shared code. For the function to work, the advanced tracking module must be enabled for the site.

Enabling and disabling advanced tracking for a site

Before you can use advanced tracking on a site, you must enable the advanced tracking module for the site. You do this through the Frosmo Control Panel.

Only certain Frosmo users can enable and disable site modules. If you're a company user, a Frosmo user enables and disables the modules for your site. For more information, contact Frosmo support.

To enable advanced tracking for a site:

  1. In the Control Panel, click your username, and select Company Settings.

    Enabling advanced tracking for a site

  2. Click the quick menu button for the site, and select Set modules.

    Enabling advanced tracking for a site

  3. Click Add for Advanced tracking.

    Enabling advanced tracking for a site

  4. Click Close.

You have enabled advanced tracking for the site. You can now track custom events.

To disable advanced tracking for the site, follow the above steps, but click Active for Advanced tracking.

Disabling advanced tracking for a site

Tracking custom events for modifications

To trigger a custom event for a modification, call the frosmo.easy.tracking.event() function:

frosmo.easy.tracking.event(action, payload)

Table: Function parameters

ParameterDescriptionTypeRole
actionName of the action that the event represents.String (32)Required
payload

Identifies the modification and variation to which the event is bound.

The stringified length of the object must be 1500 characters or less.

If you omit this parameter, the event is not bound to any modification and will therefore not be visible anywhere in the Control Panel.

ObjectOptional

Table: Payload object properties

PropertyDescriptionTypeRole
modificationId

ID of the modification to which the event is bound.

If you trigger the event from within modification content, use the message.id variable to get the current modification ID.

IntegerRequired
variationId

ID of the modification variation to which the event is bound.

If you trigger the event from within modification content, use the message.revision variable to get the current variation ID.

IntegerRequired

You can view the custom event statistics in the Control Panel.

Example

The following examples trigger a custom event when the visitor clicks the blue link in a modification with multiple links. The first example uses hardcoded IDs. The second example, which is used within modification content, retrieves the IDs dynamically from the message variable. You would trigger separate events for the other links in the modification.

frosmo.easy.tracking.event('click_blue_button', {
    modificationId: 1,
    variationId: 1
});
frosmo.easy.tracking.event('click_blue_button', {
    modificationId: message.id,
    variationId: message.revision
});