A custom action is any visitor activity or state that you want to track on a website, such as a button click, form submission, or login status. You can use custom actions to segment visitors, fire triggers, and control whether to display modifications.

The Frosmo Platform supports the following custom action types:

You can use the data layer to track basic custom actions. You track visitor geolocation through the Frosmo Control Panel.

Tracking basic custom actions with the data layer means triggering a custom action event whenever a visitor completes an action or enters a state that qualifies as a basic custom action.

The data layer supports the custom action object for triggering custom action events.

For more information about custom actions, see the custom actions guide.

Implementing segmentation with custom actions

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

Triggering custom action events

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

    frosmoEvent: 'string',
    frosmoValue: 'string'

The call triggers the event and sends the custom action data to the Frosmo back end, allowing you to reference the action from a segmentation rule, a trigger evaluation point, or modification state settings. If an action with the same name already exists, the value is added to the existing action. If the value, too, already exists, no new data is stored, and the event is simply triggered.

Custom action object

The custom action object describes a custom action event. The object properties together define the custom action data.

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


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

// Set the productCategory variable

    frosmoEvent: 'Product category',
    frosmoValue: productCategory