AdWords
2.6K members online now
2.6K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

Event Tracking In Universal Analytics

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I'd like to track people clicking on a button with event tracking. So I've created 2 different buttons (call & email) and 2 events in UA. Now, I'm just putting the tag at the right place but my second button is not recording (I'm making tests).

Could please tell me if there is something wrong in this code? 


<a href="mailto:gretaduval@gmail.com" onClick=ga('send', 'event','Button','Click','Email');"><img src="http://gretaduval.be/wp-content/uploads/2014/06/email-estheticienne.png"></a>

 

Thanks a lot!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Sebastien D
September 2015

Re: Event Tracking In Universal Analytics

Explorer ✭ ✭ ✭
# 3
Explorer ✭ ✭ ✭
Hi Sebastien,

You are missing an inverted commas, Just insert if after onClick= and it will work.

<a href="mailto:gretaduval@gmail.com" onClick="ga('send', 'event','Button','Click','Email');"><img src="http://gretaduval.be/wp-content/uploads/2014/06/email-estheticienne.png"></a>

Cheers,
Nouman

View solution in original post

Re: Event Tracking In Universal Analytics

Top Contributor
# 2
Top Contributor
Hi Sebastien,
You're missing an inverted commas after the onClick= part.
If you have any further questions, asking over on the Google Analytics forum might get you a quicker reply as this is the AdWords forum.

Hope that helps.
Marked as Best Answer.
Solution
Accepted by topic author Sebastien D
September 2015

Re: Event Tracking In Universal Analytics

Explorer ✭ ✭ ✭
# 3
Explorer ✭ ✭ ✭
Hi Sebastien,

You are missing an inverted commas, Just insert if after onClick= and it will work.

<a href="mailto:gretaduval@gmail.com" onClick="ga('send', 'event','Button','Click','Email');"><img src="http://gretaduval.be/wp-content/uploads/2014/06/email-estheticienne.png"></a>

Cheers,
Nouman

Re: Event Tracking In Universal Analytics

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Thank you Nouman for your reply.

I'm trying right now but it should work, still waiting data load...

Re: Event Tracking In Universal Analytics

Explorer ✭ ✭ ✭
# 5
Explorer ✭ ✭ ✭
Sabestien,

Here is a quick way to check whether your event is working properly or not.

On your website complete the action yourself that will generate this event. Then go to Analytics and check Real Time Report > Events this will report live stats of your event tracking. Choose Events (last 30 min) and see whether you are able to see an event reported there that you just completed on your website.

Cheers,
Nouman