How to concatinate 2 data layer

Gold Contributor
Gold Contributor

I would like to concatinate 2 data layer and represent it in utag.link based ont he rule

as example on link click . I pass a data layer sa utag.daat.a= "xyx"  

i createt the new utag.data.b = xxx as only if   is present  and then mapp it to the variable utag.data.b=utag.data.a + ":" + utag.data.b;

 

 

And I need to do all in the utag.link call .

 

I tried to creater the javascript extention but it returs the vaues as undientifeied as concationation is not happing at the same time

i dont want to use the join condition as I need to  do if for all the data layer element condiion of each of the cases .

Any Clue

2 REPLIES 2

How to concatinate 2 data layer

Employee Emeritus

Hi Santosh,
You may try following:
Step-1
Create a new data layer named "ut.event" (which gives you either "view" or "link" value when trigger different utag tracking call)

Create another new data layer for your joined data layer item.

 

Step-2
Create a "Set Data Value" extension

 

Step-3

Configure the extension as screenshot

"b.data_layer_1", the b is the alias of utag.data when running in extension.

 

Please let us know if this helps.

Thanks.
Marchi

How to concatinate 2 data layer

Community Manager
Community Manager

@santosh_sharma You can detect calls to utag.link() with the Tealium built-in variable ut.event. That variable will be set to "view" or "link" depending on the type of tracking call. You can add this (and other Tealium variables) to your profile using the Tealium Built-in Data bundle. Learn more about Data bundles

Joining two values from the data layer into one value is easily done with the Join Data Values extension. This extension supports Conditions so you can simply check when "ut.event" equals "link" to restrict the extension to only calls to utag.link().

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.
Public