- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
I'm curious whether it's possible to have 2 different TIQ accounts on the same website using the same data layer. How can it be done? If possible, I guess both utag.js files cannot use the same utag_data object, right? Otherwise, extensions form the different accounts (profiles) may override values.
Solved! Go to Solution.
This generally isn't recommended, the issue isn't really sharing the same datalayer variable (though as you said, sharing it would cause a clash of output from extensions the first time they run)
The main issue is that utag.js has some logic to check if the "utag" object already exists on the page, and will not run. everything again if it does.
If it did, you would run in to several issues, such as which utag.data do you want to read, which utag should be firing the "link" event you have called, and so on.
In the. publish settings, its possible to change the UDO name, so you don't have to use utag_data.
The avoid the utag name clash, you would need to update your templates to use a different name instead (utag2 as a simple, but bad example).
Doing this means you would have to update the template again for future releases, and generally strays away from the common impleementation, which can make it harder to maintain in the future.
If you are able to share your usecase here, there might be a better option than to try and load two profiles on the same site.
If its faily complex, or you don't want to share here, raise a ticket and someone in support will be happy to help you out!
Copyright All Rights Reserved © 2008-2023