A custom action is any visitor action or state that you want to track and interact with on a website, and that is not a conversion, transaction, or product view. A custom action can be, for example, a button click, form submission, or login status. You can use custom actions to segment visitors, fire triggers, and control whether to display modifications.

What is custom action tracking?

Custom action tracking is the process of monitoring visitors for actions and state changes that qualify as custom actions, and collecting the data about those actions and state changes (custom action data). The data is stored in the Frosmo back end.

Custom action tracking allows you to dynamically react to visitor behavior that is not tracked by conversions, transactions, or product views. You can use custom actions to, for example, show variable content based on the page a visitor is viewing or the city they are in.

Custom action tracking in the Frosmo Platform

Figure: Custom action tracking in the Frosmo Platform (click to enlarge)

Custom actions are not included in the statistics that you can view in the Frosmo Control Panel. If you want to track a visitor action or state with statistics, track it as a conversion instead.

For more information about custom actions, the different types of custom actions, and how to use custom actions with other features, see the custom actions user guide.

Segmenting visitors based on custom actions

You can implement segmentation with a custom action in one of two ways:

For more information about segmenting visitors based on a custom action, see the custom actions user guide.

Tracking custom actions with the data layer

Tracking custom actions with the data layer means triggering a custom action event whenever a visitor successfully completes an action or enters a state that qualifies as a custom action. The data you pass in the custom action event (a name and a value) defines the custom action.

To use the data layer on a site, the data layer module must be enabled for the site.

You can only track basic custom actions with the data layer. To track visitor geolocation with custom actions, create the actions in the Frosmo Control Panel.

You can trigger custom action events from:

If you're only triggering custom action events, and not displaying any content, use shared code instead of a modification.

Tracking custom actions by triggering a custom action event from shared code

Figure: Tracking custom actions by triggering a custom action event from shared code (click to enlarge)

When you trigger a custom action event:

Triggering custom action events

To trigger a custom action event, call the dataLayer.push() function with a custom action object containing the custom action data:

    frosmoEvent: 'string',
    frosmoValue: 'string'

Custom action object

The custom action object contains the data of a custom action event.

Table: Custom action object properties


Name of the custom action. The name uniquely identifies the custom action.

This property maps to the Name field of a custom action in the Control Panel.

String (128)Required

Value of the custom action. The value is case-sensitive.

This property maps to a Value field of a custom action in the Control Panel.

String (128)Required

Custom action object examples

    frosmoEvent: 'Cookie policy accepted',
    frosmoValue: 'true'

// Set the productCategory variable

    frosmoEvent: 'Product category',
    frosmoValue: productCategory

Testing custom action tracking

To test that custom actions 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 custom actions are tracked. If custom actions events are successfully triggered with the data layer, the browser console displays the following messages for each event:

    If the custom action has been enabled as a modification state in the Frosmo Control Panel, the browser console also displays the EASY [events] info:: state.set message.

    The following figure shows an example of the custom action event messages.

    Testing custom action tracking

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

    Testing custom action tracking

  5. Open the Frosmo Control Panel, select Utilities > Custom Actions, and check whether the tracked custom actions are listed with the passed values.

    Testing custom action tracking

    If you define titles for the custom action values in the Control Panel, the custom actions overview displays the titles rather than the values.

    Testing custom action tracking