Dynamic Data in script issue


I am adding a Google Analytics script to the HTML head of page.

It works fine when I paste the script in.

However, when I try to pull in the data dynamically, its not loading the script.

My hunch is because the page is loading the JS first before grabbing the dynamic data. I verified this with the gtag detector. With the whole pasted version, it runs fine. With the version containing dynamic date, I just have a google analytics with no ID (my dynamic aspect)

Do I have any way of loading a script based on the page data?

This is a feature that allows our users to add their google analytics script to a page.


did you get answer to your question

Nope. But I found a way forward in my instance by simply attaching the script to the page thing in a workflow so it doesn’t have to dynamically populate the data on page load, it’s already loading it.

This topic was automatically closed after 70 days. New replies are no longer allowed.