Is there a resource I could read/look into that teaches me all about managing Templates?

Bronze Contributor
Bronze Contributor
 
5 REPLIES 5

Is there a resource I could read/look into that teaches me all about managing Templates?

Employee Emeritus

Hi Kayvan, The Tealium Custom Container template has comments in there to provide details on how to use it. In general, it may be better to write custom code in a Javascript Extension and scope it to your Custom Container. In that way, you don't need to go to "Manage Templates" in order to update your code.. just edit the Extension that is scoped to this tag. The only template that should need to be "Managed" on your end is the Tealium Custom Container. If there is a specific tag vendor template that appears to be different from an implementation guide you have received from the tag vendor, please let your account manager know. We'd like to update the master tag template to make sure it is current for all clients. Here is a post on the Tealium Custom Container: https://community.tealiumiq.com/t5/Tealium-iQ/Tealium-Custom-Container/ta-p/14015 Let me know if this is helpful or if you have a specific question around Templates

Is there a resource I could read/look into that teaches me all about managing Templates?

Bronze Contributor
Bronze Contributor
Interesting. Please let me know if I understood this correctly - given the following scenario: If I have a tag that is currently supported by Tealium where I would like to change a particular field's default derived value, I can override this by creating an Extension catered for it? Example: Tag "foobar" contains a field "transaction_amount" which by default references a utag_data data called "subtotal", if i wanted to change the field's value to like something like subtotal+shipping+handling - I would place this computation into a a new variable in an Extension i'll create and then change the reference data of transaction_amount to the new variable/field name?

Is there a resource I could read/look into that teaches me all about managing Templates?

Tealium Employee
Hi Kayvan, I'm breaking your response into two parts. 1) "I would place this computation into a a new variable in an Extension i'll create" is correct. It would most likely be a Set Data Values extension where you would set the new variable such as "newOrderVar" to "JS Code" with a value of: parseFloat(b.subtotal)+parseFloat(b.order_shipping)+parseFloat(b.order_handling) 2) "and then change the reference data of transaction_amount to the new variable/field name". Now that you have the new variable "newOrderVar" you should be able to map that variable to the tag and overwrite the default variable. This way you do not have to touch the JS in the template. Note: I'm not sure which tag you are trying to manage, but most tags have the ability to overwrite default variables via mappings. If the tag you are managing does not have this ability then like Ty states, let us know and we'll update it so that you are able to. Managing the Template is a preferred last resort.

Is there a resource I could read/look into that teaches me all about managing Templates?

Bronze Contributor
Bronze Contributor
Hi Dan, I was able to successfully overwrite the default value assignment, by using the Extension > Set Data values approach as you've suggested. Thanks a lot everyone! PS: I just noticed though that the new variable I created in mapping to the desired tag is visible when inspecting the Universal Data Object values under the Tealium Web Companion. Does this mean that the return size of tealium increased?

Is there a resource I could read/look into that teaches me all about managing Templates?

Tealium Employee
Hi Kayvan, I'm glad that worked out for you. I'm not quite clear on your question in regard to return size, but hopefully these generic response will help. UDO Anytime a new variable is created in an extension, the new property and value is added to the UDO which increases the size of the object. But that doesn't mean the value is passed to a tag, it's just available to be passed to a tag. UTAG.JS If you are asking about the size of utag.js being bigger which refers to the load time in the browser, then anything configured in the Tags, Load Rules, and Extensions tabs are output to the utag files. Therefore this will increase the size of what is being loaded into the browser. Let me know if this helps answer your question.
Public