- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hello,
I have an important case where we need to upload a tag template/JavaScript code regularly. The process of creating of the code does use a continuous integration system, but currently there is no automatic transition of transferring the artifact (JavaScript code) to Tealium iQ.
The only way I know is to manually edit a tag template or JavaScript extension and transfer the code via Cut and Paste.
Looking at the Data Layer Enrichment API in https://community.tealiumiq.com/t5/Tealium-API/Data-Layer-Enrichment/ta-p/14619, I have the hope that there is a way to not only upload JSON but also JavaScript directly.
Do you have a solution for me that uploads JavaScript code into an tag template/JavaScript extension via an API? While taking MFA into consideration?
Thanks in advance,
Michael
Solved! Go to Solution.
Hello @michael_sievers,
Per my understanding, Data Enrichment API's are specifically for enriching data layer with data that may not be available online.
I havent came across a feature in tealium to upload a tag template through API. But here is a solution which may work for you.
You could create a custom generic tag in tealium IQ, that refers a javascript file hosted on your web server. Then through the continuous integration system, you could update the javascript file and as the tealium IQ tag is referring to the javascript file, all the latest changes will get downloaded and executed on the page dynamically.
if you want to go in this route, here is the tealium provided instructions to create generic tags
https://community.tealiumiq.com/t5/Tags/Tealium-Generic-Tag-Setup-Guide-for-Tealium-iQ/ta-p/12034
I havent tested this functionality, so you may want to test in properly to avoid any loading time issues.
Agree that it may be a good new feature, if we could host js files through Teaium and make use of their global CDNs.
Hope this helps.
Thanks
Abraham
I'm going to start by saying, there are internal APIs that iQ uses to update template code, that could be used, if these where added to the public API methods.
However, with that option put to the side, I think the option @abrahameaso came up with could do what you wanted, with a little bit of an extension.
Between @craig_rouse and myself, we think we have come up with a solution, which would make use of a library and an extension.
1) In the library, you have multiple Custom Containers, each containing a version of the tag that you want to release.
2) In the profile, you have a Tealium Generic Tag and an extension. The extension would basically act as a version to file reference, and which would update the source for the Generic Tag. This way you would control, which version of the tag is being pulled down per profile, without having to worry about copy/paste issues.
Adrian
10-05-2017 05:25 AM - last edited on 10-05-2017 06:43 AM by kathleen_jo
Hello @adrian_browning,
thanks! If I understand correctly, that would not solve the intial cut and paste into the Custom Containers, or am I missing something?
Furthermore, the "normal" profiles were not planned to influence the version of the tag being loaded, altough that could be an important aspect. Out of the box, after inheriting the library, they should always have the newest version of the Tag by just publishing.
And, another point that I would like to have is a predictable URL for the tag. I'd like to be able to expect that something like utag.42.js always holds the most up to date code. That would not be given if the code is always in new tags or oscillating between two or three.
Let me take your comment as a solution to the problem and have an internal discussion if we can adopt that.
Thanks again,
Michael
You are correct you would have one initial cut and paste, but no subsequent.
However, after re-reading your original post I realise you were not talking about multiple profiles, using this method, just the one.
I can't think of any other way to do this with the current functionality that is available to you I'm afraid.
Adrian
Copyright All Rights Reserved © 2008-2023