- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hello,
Is there a way to add this HTML code as an extension to TIQ?
<script> window.dataLayer = window.dataLayer || []; window.dataLayer.push({ originalLocation: document.location.protocol + '//' + document.location.hostname + document.location.pathname + document.location.search }); </script>
I have this set up in GTM with tag firing priority of 100 - is there a way that I can also prioritise it in TIQ? It is to support our GA tag as we are running a SPA site and so need to push thr Original Location through this.
Hi josel,
Yes, you can use either "Javascript Code" or "Advanced Javascript Code" Extensions to inject custom Javascript code into your page/s.
You can do it the following way:
Remember to NOT include "<script>" "</script>" tags in your Javacript code. So do it like in the example above.
Also, have a look at Extension Scope documentation, to better understand the possibilities of when your Javacript code can run.
Copyright All Rights Reserved © 2008-2023