Upload of a tag template via API?

michael_sievers
Occasional Contributor
michael_sievers

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

 

5 REPLIES 5

Upload of a tag template via API?

abrahameaso
Contributor
abrahameaso Contributor

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

Upload of a tag template via API?

michael_sievers
Occasional Contributor
michael_sievers
Hello @abrahameaso,

thanks for the suggestion! I'm afraid the situation is a little more complicated than hat, although I'll keep you suggestion in mind for cases that apply and where a CDN is available.
In our case, the Tag templates belongs to a library profile and we want to explicitly allow the inheriting profiles to control publishing, allowing them to be tested separately and extensively.
In order to ensure such a controlled publication, I'm afraid we won't be able to use your suggestion.
Data Layer Enrichment fulfills some requirements (available via CDN, API upload), but not others (work as a JavaScript tag, especially from the context of a library profile), so I'm hoping for some solution that does just that.. Otherwise it's back to the error prone Cut and Paste.

Best regards,
Michael

Upload of a tag template via API?

Tealium Employee

Hi @michael_sievers

 

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

 

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Upload of a tag template via API?

michael_sievers
Occasional Contributor
michael_sievers

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

Upload of a tag template via API?

Tealium Employee

Hi @michael_sievers

 

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

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.