Remote commands are configured to specific vendor SDK releases to avoid any incompatibility between the Tealium Remote Command code and the vendor SDK. If you require updated vendor SDK functionality, contact Tealium support for help with upgrading.
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:
If the vendor SDK supports consent management, and the client wants to manage consent for the vendor SDK, then verify that the vendor SDK is configured to be opted-out by default. Use the Tealium iQ Remote Command tag for this vendor when the user opts-in, based on the consent status stored in the Tealium SDK.
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.