Datalayer tag experience for Marfeel SDK methods
The Datalayer Tag Experience triggers any Marfeel SDK method based on the values of a JavaScript object accessible on the window context. You define conditions in JSON, and the system invokes the corresponding SDK action when those conditions match.
To create a Datalayer Tag Experience:
- Open Experience Manager.
- Create a Datalayer Tag Experience.

Set the user type
Section titled “Set the user type”setUserType is invoked with values 0, 2, 3 or 4 depending on the value of the user.type object. Each condition maps to a specific user classification: anonymous, registered, subscriber, or exSubscriber.
[ { "type": "object", "path": "user.type", "effects": [{ "action": "userType", "condition": "anonymous", "params": { "type": "fixed", "value": 0 } } , { "action": "userType", "condition": "registered", "params": { "type": "fixed", "value": 2 } } , { "action": "userType", "condition": "subscriber", "params": { "type": "fixed", "value": 3 } } , { "action": "userType", "condition": "exSubscriber", "params": { "type": "fixed", "value": 4 } } ] }]Trigger a conversion
Section titled “Trigger a conversion”The system watches an array named dataLayer for entries that match specific field values. When dataLayer.event == GAevent, dataLayer.eventAction == signup, and dataLayer.eventCategory == user, it calls trackConversion('signup') on the Marfeel SDK.
[ { "type": "array", "path": "dataLayer", "effects": [{ "action": "conversion", "condition": { "event": "GAevent", "eventAction": "signup", "eventCategory": "user" }, "params": { "type": "fixed", "value": "signup" } } ] }]What does the Datalayer Tag Experience do?
The Datalayer Tag Experience triggers any Marfeel SDK method based on the values of a JavaScript object accessible on the window context. You configure conditions and actions in JSON format, and the system invokes the corresponding SDK method when those conditions are met.
How do I set user types with the Datalayer Tag Experience?
Define a JSON configuration that reads an object path (such as user.type) and maps each condition (anonymous, registered, subscriber, exSubscriber) to a fixed user type value (0, 2, 3, or 4). The system invokes setUserType with the corresponding value.
How do I trigger a conversion through the Datalayer Tag Experience?
Configure a JSON rule that watches an array (such as dataLayer) for matching conditions. When the event, eventAction, and eventCategory fields match your criteria, the system calls trackConversion with the specified value.