Forum Moderators: DixonJones

Message Too Old, No Replies

Tracking CHAT with GA?

Events perhaps? How do you track script execution?

         

chewy

12:12 am on Jan 25, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hope I'm using the right words here.

I am trying to track when a client hits the "chat" button on a site (product is called phplive) - with hopes of setting this up as a trackable event that I can tie back to ecommerce revenue.

Analytics should be able to do this - but I cannot figure out how to track when a javascript is fired.

I think events is already tracking it, it is just not further categorized and falls into the "not set" hole.

The chat people don't have anythign useful on their site either.

All searches on Google to find some clues on how to do this seem to mislead me.

Prolly because I am using the wrong search terms!

Surely this can be done, through event tracking - so how do I tag the js code?

Thanks - as always!

-C

phranque

12:36 am on Jan 25, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



have you tried something like this on the chat button?

 onClick="phplive_launch_chat_0(0); _gaq.push(['_trackEvent', ...]);"

chewy

12:37 pm on Jan 25, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



most awesome, I tip my hat kind sir!

toplisek

1:48 pm on Jan 25, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have posted similar question in the case of Back button.
Is this working:
I see sample:
onclick="history.go(-1); _gaq.push(['_trackEvent', ...]);"

As event tracking in Google is using onclick, how to put code like:
_gaq.push(['_trackEvent', 'CallToAction','Button', 'Backbtn']);

chewy

3:19 pm on Jan 25, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



should have mentioned - I am using Google Universal - do these commands work with new and old GA?

toplisek

11:34 am on Jan 26, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm using Google Universal. Is this correct code?
_gaq.push(['_trackEvent', 'CallToAction','Button', 'Backbtn']);

toplisek

1:11 pm on Feb 4, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<a onclick="history.go(-1); ga('send', 'event', 'Button','Back', 'left');" href=""></a>