Try pre-set campaigns and get your first conversions within 15 minutes.
Mailocator / Plugins 2025-01-28 10:52:45

Connections - linking content to data

Plugin Connections is used to add dynamic values from external sources, such as product name, price or discount calculation. You can also easily add a dynamic image, change the style or perform a number of tricks with the data.

Data Sources

Using the plugin, you can easily insert any data from the following sources into your campaign:

dataLayer

You can append any value of the dataLayer data layer, as long as it is implemented on the site. On most sites today, the data layer is standard.
If you don't know if your site supports dataLayer, ask your webmaster or open the Browser Console and type dataLayer at the console prompt - if you see an array of objects, the data layer is functional.

Cookies

If the cookie is accessible, you can use and insert its value into the campaign.

Javascript

You can also use any available javascript object or variable.
If the variable has not been initialized or is undefined, it will be ignored.

Storage

The use of localStorage and sessionStorage is tied to the domain from which the script that accesses the storage is running. Therefore, storage cannot be used for data completion purposes.

Linking the resource to the campaign

Turning on the plugin

First, make sure you have the Connections plugin turned on:
Go to Settings > Plugins and activate the plugin by selecting and confirming it.

Activating the plugin

  • Open your campaign in the Editor
  • Select the Layout layer and activate the plugin to run immediately when the campaign loads - MailocatorConnections.init(this)

Connecting the source to the campaign

  • select the object you want to dynamically change - for example an image or text
  • switch to Connections electrical_services in the Inspector on the left
  • select add to add a new data connection

  • name the connection according to your own conventions
  • select data source - dataLayer, cookies or javascript
  • enter the source identifier - i.e. the exact name of the dataLayer object, cookie name, object or javascript variable
  • select the appropriate target to which the value from the data source should be placed. You can simply replace the text in the element or the contents of the src, href attributes or the class name.

If you don't like the format of the value, you can select one of the transformations and convert the machine format to the required format - for example, convert a period to a comma for decimal numbers.

Editing connections

You can find the resulting connection in the inspector and click to edit it at any time.

Testing should always be done directly on the specific pages where the data sources are available. To verify functionality, just limit the display by enabling only your own IP address, so only you will see the tests.