Passing dynamic javascript values to Test&Target

Silver Contributor
Silver Contributor

Hi all,
is it possible to pass dynamic javascript values from Tealium's data layer to Test&Target custom parameters?
We tried through the field "Static Params" of the Test&Target extension with no luck. Should that field be used only to pass static params?
We also tried to set the value in the data layer and then map it to the Test&Target tag: it works but the value would be passed with every extension (mbox) mapped to that tag.
Is there a way to pass that value only to a specific extension or mbox?
To be clear, we are trying to implement Test&Target on a thank you page passing the revenue in the conversion mbox.
Any help would be appreciated.

Thanks in advance

Luca

3 REPLIES 3

Passing dynamic javascript values to Test&Target

Employee Emeritus

Hi Luca,

The 'static params' field should only be used to pass static params.

The version of TNT you're using will automatically pass revenue data on a thank you page if it detects an order. If you're trying to pass it to a specific extension, one approach would be to create a set of variables that are mapped in place of the actual values you want to use. Example: you want to map order_total, but instead, create and map tnt_order_total. Then, create a 'set data' value extension, with the same conditions as that TNT extension. In this extension, you'd set 'tnt_order_total' to 'order_total'. This way, these values are sent/created on the same conditions as your TNT extension.

If you need help trying to do this, please contact your account manager. Hope this helps!

Passing dynamic javascript values to Test&Target

Employee Emeritus

Hi Luca, you can use mapping to send data to Test&Target in the same way as any other tag. There is no mapping toolbox because unlike SiteCatalyst for example there are no defined variables that you should use. So you can just choose the variable from the list and then type the parameter name into the text box.

For ecommerce data, you don't need to map anything. If you have the Ecommerce Extension set up, then we automatically create a conversion mbox with this code:

mboxDefine('orderConfirmPage','orderConfirmPage',
'productPurchasedId='+b._cprod.join(','),
'orderId='+b._corder,
'orderTotal='+b._ctotal);

So this passes the order id, order total and the product ids from the basket to T&T automatically. The requirement is that the order ID is specified in the page, this is the trigger that the Ecommerce Extension uses to recognise a confirmation page.

If you need more information about the ecommerce extension please refer to E-Commerce Extension

Passing dynamic javascript values to Test&Target

Tealium Employee

To add to the solution provided above.

 

The Test and Target Content modification extension needs to be added and scoped to the Target tag.

 

Without completing this step data layer elements will not pass over to Target via the http request in the network traffic.

 

If you are passing over order confirmation data you should see an additional http request sent to target containing this information.

Nathan Fleming
Senior Customer Support Engineer - EMEA, Tealium
Public