Code added after DOM upon clicking a link on frontend
-
Let Site Kit place code on your site in Tag Manager connected service adds html anchor tag attributes after DOM upon clicking any link on any page on frontend.
How to replicate
- Call provided website URL
- Click any link. For better verification use a link that doesn’t lead to a new page:
For example: Click tel:-Link with telephone number on top menu (and cancel actual call) or “Problem melden” above footer (click outside of popup box to return to page) - Scroll down to bottom of the page
- See that
href="tel:
has been added in plain text after the HTML document - (optional) Repeat and verify repetitive behaviour
In Chrome’s developer tools “event listeners” I found the click listener of gtm.js being the cause of this behaviour. Once disabled this problem does not occur.
Disabling the option Let Site Kit place code on your site in Tag Manager connected services also makes the problem disappear.
gtm.js creating output after the HTML is probably caused by
{
"function": "__html",
"metadata": ["map"],
"unlimited": true,
"vtp_html": "href=\u0026quot;tel:",
"vtp_supportDocumentWrite": false,
"vtp_enableIframeMode": false,
"vtp_enableEditJsMacroBehavior": false,
"tag_id": 7
}…although I have no idea why this output is actually being sent to the end of the document.
What is happening here?
Cheers
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.