/tagmanager/community?hl=en
/tagmanager/community?hl=en
1/13/18
Original Poster
Maq Ali

<a> Tag with Javascript firing twice

For our site with GTM since this morning if <a> tag has JavaScript in href it is ending up calling it twice which results in unexpected behavior. I know there were some recent update which has caused the click event to not work but not sure if anyone else is experiencing this issue and if the team is working on fixing it. Thanks
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Was this answer helpful?
How can we improve it?
All Replies (50)
Google user
1/15/18
Google user
I am experiencing the same issue here
Yuval Yehudar
1/15/18
Yuval Yehudar
Same issue here
Hazel Tsui
1/15/18
Hazel Tsui
Same here. We are experiencing issues where the product is being added twice to the basket when users click on the add to basket button.

Our client is very frustrating here as their customer service has received a number of calls on this.

Can someone in Google look into this as a matter of urgency?

I don't seem to be able to find a contact detail to get in touch with them directly....
Christopher Zapf
1/15/18
Christopher Zapf
+1 on multiple GTMs! 
Yuval Yehudar
1/15/18
Yuval Yehudar
As an intermediate solution I'm using: $("...").unbind("click").click(function () { ... })
But this is a patch and not a solution, and you need to go over your entire application and patch it...
44 MORE
Michael Zyrus
9/24/18
Michael Zyrus
Same issue here, on Angular 6 [routerLinks] are firing once, but gtm.historyChange is fired twice on <a> links. I only have triggers on Click Classes. 
 
This question is locked and replying has been disabled. Still have questions? Ask the Help Community.

Badges

Some community members might have badges that indicate their identity or level of participation in a community.

 
Google Employee — Google product team members and community managers
 
Community Specialist — Google partners who help ensure the quality of community content
 
Platinum Product Expert — Community members with advanced product knowledge who help other Google users and Product Experts
 
Gold Product Expert — Community members with in-depth product knowledge who help other Google users by answering questions
 
Silver Product Expert — Community members with intermediate product knowledge who help other Google users by answering questions
 
Product Expert Alumni — Former Product Experts who are no longer members of the program
Community content may not be verified or up-to-date. Learn more.

Levels

Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:

  • Post an answer.
  • Having your answer selected as the best answer.
  • Having your post rated as helpful.
  • Vote up a post.
  • Correctly mark a topic or post as abuse.

Having a post marked and removed as abuse will slow a user's advance in levels.

View profile in forum?

To view this member's profile, you need to leave the current Help page.

Report abuse in forum?

This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.

Reply in forum?

This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.