Highlighted

Can I add HTML code?

Bronze Contributor
Bronze Contributor
Hi! I need to add a pixel and I would like to know if it is possible to add html code directly. The tag looks like follows: <script type="text/javascript"> </script> <script type="text/javascript"> </script> So, how can I add this tag? I havenâ t seen any Tag or template where HTML code can be addedâ ¦ Thanks in advance!
5 REPLIES 5
Highlighted

Can I add HTML code?

There is a MediaMind pixel template- not sure if that's the tag you're looking to add? If not, the generic pixel template is called "Tealium Pixel (or iframe) container", where you can add the script for your tag. You might be able to map the other parameters like script ID and such, although it can be tricky. If you go this route you might want to loop in an engineer from Tealium to help you configure it. I don't think there's a way to easily add HTML directly- the other two methods would likely work better.
Highlighted

Can I add HTML code?

Employee Emeritus
Hey Esteban, You are correct that this is HTML code, but the only contents of the HTML is actually JavaScript. Everything between the <script> and </script> tags is the really important stuff here. If we break it out it will look something like this: document.write(unescape("script id='xxx_yyyyyy' src='" + (("https:" == document.location.protocol) ? "https://" : "http://") + "www.host.com/scripts/trackjs.js'")); PostAffTracker.setAccountId('default'); try { PostAffTracker.track(); } catch (err) { } Now we've got to be careful with the "document.write" in this code. the doc.write function is synchronous and as a best practice Tealium recommends doing everything Asynchronous. This snippet seems to just be a sample anyway because the file "www.host.com/scripts/trackjs.js" doesn't exist, seems to be a dummy file. If the two currently supported MediaMind tags do not meed the needs of the actual code snippet provided, I would reach out to your Account Manager to have one of our Solutions Engineers look through this with you. The "PostAffTracker.track()" function is a callback that needs to load after the trackjs.js file has loaded. This introduces one more level of complexity into the matter.
Highlighted

Can I add HTML code?

Employee Emeritus
Hi Esteban; The best solution for this type of script is the Tealium Custom Container. In this case, you would not be adding HTML code, but using the container to make your library call, and functional calls within your library. If your script requires a custom id for the script, this can also be worked around within the custom container as well. Going with Jared's response above, this seems to be an example URL, so it's hard to tell what the PostAfftracker() functions do or if they can be called on with the container, so reaching out to your AM might be the best bet to have someone look at this in more detail and set this up for you and walk through how this type of script is accomplished.
Highlighted

Can I add HTML code?

Bronze Contributor
Bronze Contributor
Hi all, thanks for your comments and help :-) I was wondering if there was any way to include HTML directly because the problem here is that we have lots of tags like this (not all of them are the same) and it takes a long time to modify all by removing the html tags. But I think that we'll have to do it anyway to make it work. Jared, as you say, the domain "host.com" is just an example so it's the client's hostname.. We'll try it and let you know. Thank you very much!
Highlighted

Can I add HTML code?

Employee Emeritus
Hey Esteban, Thanks for the clarification. Tealium is a JavaScript solution so you will need to remove the HTML code from the script to set them up properly within the Tealium Interface. Thanks