Analytics
5.6K members online now
5.6K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

How to implement GTM tracking for the same buttons on one webpage?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello!

I have the next issue. I need to track Facebook button's clicks with GTM. The Facebook buttons are placed in the top and footer of the page. How could I track the clicks on them separately from each other?

I suppose that I can do it using Custom Variables but I don't know what the type of variable would be correct.

Here are the codes of these buttons:

<a class="fusion-social-network-icon fusion-tooltip fusion-facebook fusion-icon-facebook" 
style="color:#be8a0e;background-color:#2b2924;border-color:#2b2924;border-radius:50px;"
target="_blank" href="https://www.facebook.com/BistroNapolyon" data-placement="bottom"
data-title="" data-toggle="tooltip" title="" data-original-title="Facebook"></a>


<a class="fusion-social-network-icon fusion-tooltip fusion-facebook fusion-icon-facebook" 
style="color:#be8a0e;background-color:#211f1c;border-color:#211f1c;border-radius:50%;"
target="_blank" href="https://www.facebook.com/BistroNapolyon" data-placement="top"
data-title="" data-toggle="tooltip" title="" data-original-title="Facebook"></a>

 

The only difference is the "Data-placement" attribute.

 

Could you help me with it?

Thanks!

Have a great day!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Victor T
May 2016

Re: How to implement GTM tracking for the same buttons on one webpage?

Rising Star
# 2
Rising Star
Add a different ID to each anchor tag and use Click ID - <a id="top-facebook" ...> and < id="bottom-facebook" ..> for example. Trigger an event when Click URL contains "facebook.com/BistroNapolyon" and use the Click ID as a value in an event as {{Click ID}}

https://support.google.com/analytics/answer/6164470?hl=en
_________________________________________________________________________
Director of Marketing | Nehmedia | Partner Profile

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Victor T
May 2016

Re: How to implement GTM tracking for the same buttons on one webpage?

Rising Star
# 2
Rising Star
Add a different ID to each anchor tag and use Click ID - <a id="top-facebook" ...> and < id="bottom-facebook" ..> for example. Trigger an event when Click URL contains "facebook.com/BistroNapolyon" and use the Click ID as a value in an event as {{Click ID}}

https://support.google.com/analytics/answer/6164470?hl=en
_________________________________________________________________________
Director of Marketing | Nehmedia | Partner Profile