Each page can have its own element.Just that the scripts once
added in Parent page will be added automatically to the DOM when the
child pages rendered since they are connected.When pages have multiple
parent, script tag has to be added in all their respective Parent pages.
One possible and suggested way could be to have a Parent-Child html page
design(in some technology we also refer them as Layout page), where all
pages have one parent common page.You can than reference your script
only in Parent page and all Child pages will automatically have
reference to it.
There are 2 things which might be causing this:1) Important thing here
is the time at which this dynamic addition of the script is happening.
Please ensure this script gets loaded on the page well before, or, at
the time when DOM gets created. Something like document.ready() in
Jquery, or, something like below if using plain
your code goes here}, false);2) Try appending http:// as the prefix to
the DTM Embed URL you are usin...
I set an eVar through the Custom Script in DTM (in an Event based rule)
like below:s.eVar6 = this.getAttribute('data-name');'ClickedELement' is
a blank DataElement, I have to set this as without setting eVar6 through
UI like this, eVar6 was not getting passed in Analytics call.I am
setting this as I have to set the value from the HTML element to keep
the implementation general . There can be multiple such HTML elements
each of which I am differentiating via "data-name" attribute present in
I have an application which has multiple pages (say A, B and C), and
each page has a common link placed on each of them. I want to track what
all pages did he navigated and how many times user click on the link and
from which page.Table should look like:User X Count UsageLinkCountPageA
:10 3PageB : 4 1User Y Count UsageLinkCountPageA: 16 6PageB: 7 2I play
around with 3 things:Page(Page), Username(eVar) and LoggedInCount
(Success event1) and LinkClickCount(Success Event2)I have applied