Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Gold Contributor
Gold Contributor
If I call _gac.push directly then I see the pixel firing in fiddler and can see the results in the google analytics site.
7 REPLIES 7

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Employee Emeritus
Can you provide more information? Specifically the code snippet you are using when you call utag.link and utag.view?

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Employee Emeritus

More info on using utag.view and utag.link can be found here: https://community.tealiumiq.com/t5/Tealium-iQ/AJAX-Tracking-in-Tealium/ta-p/14034 but as Son says, more info on the calls you are trying to make would be very helpful.

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Employee Emeritus
Main think to remember is when making a utag.link/view() call you are passing a data layer along with it that is not necessarily the same as whats in the utag.data object. example: if you do utag.view({var1:"1",var2:"2"}), your data layer will only have var1 and var2 defined (along with any dom.vars, dom.title, dom.url) and that is all. if you want to fire the event using whats available in the utag.data layer, you will need to do utag.view(utag.data), especially if you have load rules that are dependent on certain values in the data layer, you might not see anything happen otherwise. are you trying to pass data that isnt already in data layer (utag.data) i.e. in addition to, or just what is already available?

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Gold Contributor
Gold Contributor
All of the data is available when I am making the call. This works: _gaq.push(['_trackEvent', 'Search', e.type, searchTerm]); This does not work: utag.link({action:"search", opt_label:e.type, opt_value:searchTerm + "_utag"}); (e is a jquery event object, e.type is 'click' in my example; searchTerm is the text from the input field; I append "_utag" for testing so I can see what is coming from the utag call)

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Moderator
Moderator

Hi Brian,

 

Have you made sure that "action", "opt_label" and "opt_value" are mapped in the GA tag to their respective destinations ("Event Category", "Event Action" and "Event Label")? If so, perhaps you've confused Event Label & Event Value when you've done the mapping. Event Category &Event Action are both required values in GA (args 3&4 in your _gaq.push() statement above) and Event Label and Value are optional. If you map only to Event Action, Event Label and Event Value, no event will be fired, as this is not valid syntax for GA.

 

In case you haven't seen it, I did a community post yesterday regarding this: https://community.tealiumiq.com/t5/Tealium-iQ/How-To-Guide-Event-Tracking-With-Google-Analytics/ta-p... Feel free to feed back on the comments there if you think I've missed something important.

 

Hope this helps.

 

Craig.

Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Gold Contributor
Gold Contributor
Hi Craig, your doc was exactly what I was looking for and got me up and running. One thing I would do is move steps 1 & 2 under a section called 'prerequisites' before the 'Simpler' section this way it is a little more clear they need to be done for both the Set Data Values or Javascript Extension parts.

Do you have full examples of using utag api with and without jquery? I have a google analytics tag and I am calling utag.link and utag.view client side on a button click event but nothing is happening (ie no pixel is firing).

Moderator
Moderator
Thanks for the feedback, Brian. Good suggestion. Glad it helped you!
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Public