Map a static variable to destination

Gold Contributor
Gold Contributor

Hi All,

 

I have a tag that requires a number of variables to be mapped from the data layer. However, there are a few required variables that we don't have in our data layer. The outside vendor said, no worries, just pass a static variable (ie "1") for that field and they will ignore on their end. 

 

Is it possible to set a static variable in the data mapping interface, or do I have to choose a variable? If not, what's the best way to accomplish this? I'd rather not have to edit the tag template just to pass "1" to a required variable. 

4 REPLIES 4

Map a static variable to destination

Gold Contributor
Gold Contributor

Hello @tester1234,

If you want to populate the value "1" in variable. All you have to do is to create new Variable with the name of something and create new Set Data Value extension and pass the value 1 as static or create a new JS extension and write the code to set the variable to fire as static as 1.

Hope it helps!! Kindly let me know if you need any clarifications on this!!!

Map a static variable to destination

Gold Contributor
Gold Contributor

Thanks for the reply @Srinivasan

 

This seems like a lot of overhead to send a static variable. I'd prefer not to have to create a new data variable and a new extension for all the different static variables. I guess a simpler solution would be to modify the tag template to include those static variables. 

 

I'll take a look at that approach. Thanks

 

Map a static variable to destination

Tealium Expert
Tealium Expert

@tester1234 I can understand your take on the approach. However, the overhead is not that big, you need only one extension for all your variables. Think of it as a library. Where I work, we have two such extensions where we put a lot of simple stuff and it makes sense.

What you mention as the alternative, to amend the code directly in the template(s) is not recommended unless you use custom tags. You wouldn't want to tamper with Tealium library tags since they will be marked as customised and you can never update them to newer versions, once they get available. That creates overhead work!

Map a static variable to destination

Tealium Employee

Hi @tester1234

 

I would suggest posting into : https://community.tealiumiq.com/t5/Feedback/Feature-requests/td-p/10599 asking for this enhancement, or emailing ideas@tealium.com to get this feature requested (it has been asked for a few times over the years).

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public