Try pre-set campaigns and get your first conversions within 15 minutes.
Mailocator / Actions 2025-01-28 10:11:25

Adding a value to dataLayer

If you need to independently evaluate the action data from Mailocator or just add information for the new version of Google Analytics, you can use the action dlPush.

Mailocator allows you to add selected information to the dataLayer in two ways:

  • automatically, simply select actions in Scenario > Scenario Settings and assign values to them
  • using the dlPush action

In both cases the resulting write to dataLayer looks like this:

{ event: 'event_name', mailocatorEventType: 'action_type' } 

Automatic event logging

You can name event_name@ events in Scenario Settings, where you can assign a custom name to most common events for action_type:

Logging an event using the dlPush action

Use write to record the event to the dataLayer:

mailocator.do('dlPush: action_type, action_name) 

Example of own value when closing the window:

<ml-close onclick="mailocator.do('close | dlPush: closed, campaign_123')"></ml-close>/

The object will be added to dataLayer:

{ event: 'campaign_123', mailocatorEventType: 'closed' } 

The action_name parameter is optional, if missing it will be replaced by the value specified in the Project Settings