Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Track all the link click on all pages

cathyw49544988
Level 6
Level 6

I want to track all the link click on my pages. I added an event based rule and I can not see the rule get fired. My setup as follow. Do you know why?

Thanks,

Edit Event Based Rule

Metadata

Conditions

Event

Help

Tag

Help
curiosity
=

  • href((https?:)?//)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?Regex

Rule Conditions

Help

Bubbling

Help

1 Accepted Solution
jantzen_belliston-Adobe
Correct answer by
Community Manager
Community Manager

Hi,

DTM has some built in link tracking via the Download links and outbound links. See documentation here.

If this doesn't meet your needs and you'd like to track every link, I'd recommend creating an event based rule that is fired anytime someone clicks on any <a> tag. I believe you need to at least specify which tag or selector you'd like to detect the click for in DTM. Currently you have that field blank and I'm not sure that's supported. If it were, DTM would be trying to track any click on any portion of your website.

I assume the regex you've got placed in the rule is trying to filter that out? I think there may be a simpler way but just targeting <a> tags.

I'd recommend removing the regex and adding an "a" in the tag box to see if we can get the rule to fire. Once it's firing in staging, you can add additional conditions to limit the calls to your selected focus.

Cheers,
Jantzen

View solution in original post

2 Replies
cathyw49544988
Level 6
Level 6

I noticed that O got error message in console:

satelliteLib-8ce5854f77a2ce4c2b61aa2e40d39a9284c6d678.js:2 A Parser-blocking, cross site (i.e. different eTLD+1) script, http://assets.adobedtm.com/d47c28ceb6bdb7511c67ff548d1342ba559518cd/satelliteLib-8ce5854f77a2ce4c2b6..., is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.

Does this mean my rules got blocked? Is there a way can solve this issue?

Thanks

jantzen_belliston-Adobe
Correct answer by
Community Manager
Community Manager

Hi,

DTM has some built in link tracking via the Download links and outbound links. See documentation here.

If this doesn't meet your needs and you'd like to track every link, I'd recommend creating an event based rule that is fired anytime someone clicks on any <a> tag. I believe you need to at least specify which tag or selector you'd like to detect the click for in DTM. Currently you have that field blank and I'm not sure that's supported. If it were, DTM would be trying to track any click on any portion of your website.

I assume the regex you've got placed in the rule is trying to filter that out? I think there may be a simpler way but just targeting <a> tags.

I'd recommend removing the regex and adding an "a" in the tag box to see if we can get the rule to fire. Once it's firing in staging, you can add additional conditions to limit the calls to your selected focus.

Cheers,
Jantzen

View solution in original post