1

A website has an anchor tag that redirects to the home page, when the tag has rel="noreferrer" on it, GTM will block the redirect but still trigger and count any click events for GA.

Reason I know it's coming from GTM is because I blocked the gtm.js script and it redirects correctly without altering any code.

Reason I know it's from rel="noreferrer" is because I can remove the attribute or change it to something like rel="noopener" and it still redirects correctly.

It's an internal link and therefore I can safely remove it (since noreferrer should only be for external links). But I want to know why it's being blocked.

There's nothing special about the trigger, it fires based on the class name and the trigger type is for links only and GA still picks up the trigger correctly.

This actually redirects correctly on IE11 but not on Chrome, Firefox, and Edge.

Example element

<a class="icon" target="_self" rel="noreferrer" href="/"><img src="test.png"></a>

Edit: There seems to be some relation between rel="noreferrer", the GTM script, and the clickable link being an <img /> as replacing the image with text redirects correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.