- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
11-02-2015 08:48 AM
Can anyone help me to get, how to track "Custom events" in Google Universal Analytics through Tealium implementation, please guide me step by step process to implement?
Ex: I have one website which contains Two Tabs - each tab have 15 anchor links. I want to track each link that how many times end users clicked the links.
I want to track these links in "Custom events" on Google Analytics.
Help me on this.
Thanks!
11-02-2015 08:53 AM - last edited on 11-02-2015 03:33 PM by kathleen_jo
Hello @srinii86. The easiest way to do this is using a jQuery onHandler extension (if you have jQuery 1.7 upwards)
or a jQuery onClick extension if you have 1.6 or below, which behaves in much the same way.
11-02-2015 11:37 AM - edited 11-02-2015 11:39 AM
We've done some similar stuff using the utag.link call.
utag.link({ga_event_action:"some_action", ga_event_category:"some_category", ga_event_label:"some_label"});
There are a couple ways you can implement this.
1. As mentioned by the previous commenter, attach the utag.link call to a click event using jquery. If implementing through Tealium, you can do this by: creating a custom container, make sure it loads on the page, then cut and paste your jquery to attached the click events.
This might look like:
$('#your_selector').click(function() { utag.link({ga_event_action:"some_action", ga_event_category:"some_category", ga_event_label:"some_label"}); });
2. For a more permanent solution you can consider attaching the click behavior to the onClick property of your anchor tags.
This might look like:
<a href="#" onClick="(utag.link({ga_event_action:'some_action', ga_event_category:'some_category', ga_event_label:'some_label'});">Your Link</a>
Hope this helps!
11-02-2015 03:28 PM
One thing I also forgot to add is for the values inside the utag.link call, you'll need to define them as js variables in the datalayer and then also map those values to your GA tag so that Tealium knows what to do with the values.
For example:
The variable ga_event_action in our setup has the destination ga_eventaction in our Google Analytics tag.
11-02-2015 04:44 PM - last edited on 11-02-2015 06:38 PM by kathleen_jo
Thanks for your prompt response with your valuable inputs.
if possible, could you please share any screenshot with the implementation process to track custom events in Google Universal Analytics through Tealium tool.
In Google Analytics & Tealium implmementation screenshots?
As, i'm new to Tealium configuration on implementing GUA. Previously i have worked on SC.
Thanks!
Copyright All Rights Reserved © 2008-2023