2.1K 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

Tracking events

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi..I am first time using event tracking in analytics. But the thing is in Goal Details, what are the category,action,label and values? Or tag manager is the best option for tracking events? Then how..  Should I add both analytics tracking code and tag manager container code?Confusing a lot.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Suvantech K
May 2017

Tracking events

Participant ✭ ☆ ☆
# 4
Participant ✭ ☆ ☆

Hi Suvantech,

 

You are missing a parameter on your ga event call. Please try following code:

ga('send', 'event', 'social media button', 'click', '');

 

Here your event structure will be:

Event Category: "social media button"

Event Action: "click"

Event Label: "(not set)"

 

I hope this helps.

Regards,

Güney

 

View solution in original post

Tracking events

Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Hi Suvantech,

check below article for category, action and label in details

 

https://support.google.com/analytics/answer/1033068?hl=en

 

It is up to you what you want to use GA or GTM , If you are comfortable with GTM then go with GTM.

 

No you have to use either one analytics tracking or GTM container if you implement both you will get incorrect data.

 

Thanks

Tracking events

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thank you for the reply. I am not comfortable with google tag manager because it is confusing. I removed tag  manger code. Now my website has only universal analytics code that is given bellow.

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'xxxxxxx', 'auto');
  ga('send', 'pageview');

</script>  

( i just removed tracking ID here.)

My question is I need to know the clicks on my social media button.For that i added this code ;
<a href="https://www.facebook.com/example/" onClick=”ga(‘send’, ‘event’, ‘social media button’, ‘click’, , '',);” target="_blank" class="fa fa-facebook"></a>

But I dont get the events on google analytics, Is there any problem in code? I am not familiar with coding.
Marked as Best Answer.
Solution
Accepted by topic author Suvantech K
May 2017

Tracking events

Participant ✭ ☆ ☆
# 4
Participant ✭ ☆ ☆

Hi Suvantech,

 

You are missing a parameter on your ga event call. Please try following code:

ga('send', 'event', 'social media button', 'click', '');

 

Here your event structure will be:

Event Category: "social media button"

Event Action: "click"

Event Label: "(not set)"

 

I hope this helps.

Regards,

Güney

 

Tracking events

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

 Thank you so much Güney K ,

Now it is working. Smiley Wink Actually, I was struggling with that because am not well in coding. 

Tracking events

Participant ✭ ☆ ☆
# 6
Participant ✭ ☆ ☆

@Suvantech K, You're welcome! Smiley Happy

Re: Tracking events

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Güney K
 
 
Can I use these "Button click"event  in every pages of my website?
Example; I have social media buttons in all pages, so is there any problem with adding these onclick code in all pages?
Should I change anything?

Tracking events

Participant ✭ ☆ ☆
# 8
Participant ✭ ☆ ☆

@Suvantech K,

 

If you want to track them in all pages, you should add the event on all pages that you have your social media buttons. There is no problem with doing that. Later, if you want to analyze on which page they were being used, you can add 'Page' dimension as secondary dimension on your Events report.

 

Regards,

Güney

 

Regards,

Güney

Tracking events

[ Edited ]
Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

I added that event. How can i add 'page' dimension as a secondary on event dimension?

Tracking events

Participant ✭ ☆ ☆
# 10
Participant ✭ ☆ ☆

Please navigate 'Behaviour' -> 'Events' -> 'Top Events' then choose 'Page' from the 'Secondary dimension' dropdown.