Configure a vendor integration using a JSON file. Load this file locally in the app or from a remotely hosted URL. A JSON template file is available for each vendor integration.
A JSON template file has three main sections: config, mappings, and commands.
This section sets vendor SDK initialization options such as client ID, API key, or the log level. For example, the following sets the application ID:
This section defines your data mappings. The following mapping assigns the data layer variable product_id to the vendor parameter param_item_id.
The vendor parameter may use a prefix with dot notation to scope a mapping to a specific object in the payload. The prefix defines the object and the value to the right of the . becomes a property of the object. For example, the following mapping assigns product_id to the param_item_id variable of the event object. The remote commands parser creates an event object with param_item_id as one of its properties.
The object prefix is typically event., product., or purchase., but may be any custom object name. Refer to the JSON template files to see the object prefixes used for your vendor integration.
This section maps Tealium event names to the vendor’s events. The value left of the : is the Tealium event name and the right value is the Tealium wrapper for the vendor’s method. In the following example, the Tealium event cart_add is mapped to the vendor method logevent:
When using iQ Tag Management in your app, custom remote commands provide the ability to trigger native code blocks from the non-rendered webview. This is used in cases where data held inside the non-rendered webview needs to be passed back to the native code for further processing.
A remote command has a command name and a payload of data.
The name of the command, or command ID, registered with native code in your app.
The data passed to the native app and received as an object named requestPayload in the response callback of the handler.
Define remote commands in your native app at build time. The Custom Remote Command tag only executes pre-defined code on the device.
In the native code, the add() function registers a remote command handler. The callback function response has access to the payload with response.payload. In the following example, the referenced payload variables have a matching data layer variable configured in iQ Tag Management.