Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Gold Contributor
Gold Contributor

Hi there,

Is there any other way for link tracking/event tracking without the use of utag.view() and utag.link()? Is javascript code customer handling extension the only way for help ?

 

Tracy

 

13 REPLIES 13

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Employee Emeritus

@TracyAu are you looking for another method, besides view and link, or are you trying to send a call without using JavaScript? 

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Tealium Expert
Tealium Expert

@TracyAu are you trying to achive this for any Webanalytics calls?

Thanks!

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Gold Contributor
Gold Contributor

I am looking for another method besides utag.view() and utag.link(), so that there will be no utag related script generated to HTML, except the <scripts> part

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Gold Contributor
Gold Contributor

I am looking for tealium link tracking/event tracking method other than using utag.view() and utag.link(), and would like to see if such alternatives can be achieve for Webanalytics marketplace like GoogleAnalytics, DoubleClick, etc

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Tealium Employee

@TracyAu I would be interested to understand what your use case here is.

utag's event tracking is built on the view and link methods for tracking pageview and user interaction events which all tags are built to support. You are able to trigger your own events by using the utag.track() method and passing in your own event name. So for example:

utag.track('video',{});

You would need to modify your tag templates to support such an event as by default they only support view and link events.

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Gold Contributor
Gold Contributor

@simon_browning, do you mean to modify tag templates and update the script: u.ev={view:1}; for other tracking ?

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Tealium Employee

@TracyAu yes that is what I was referring to.

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Gold Contributor
Gold Contributor

@simon_browning, thanks a lot for your reply.

Seems jQuery handler extension somehow can help me for some event tracking issue, in addition for jQuery handler extension, I wonder if custom javescript code can also help for event tracking either...is it feasible to do so?

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Tealium Expert
Tealium Expert

Ah, I think we might have looked at solving the same issue.

In our case, we wanted to:

  1. Not have any vendor-specific code on pages so that any future change of vendor didn't require an HTML code change, and
  2. Not risk causing JS errors if a customer's ad blocker prevents utag.js from loading

There are two approaches you can take. The first is to create wrapper functions for utag.view() and utag.link(). If handling utag.js unavailability is your primary goal, then try the following:

// Add this code to all your pages
window.utag_view = function(){
  // do nothing
};
window.utag_link = function(){
  // do nothing
};

// Add this code to a DOM Ready Tealium extension
window.utag_view = window.utag.view;
window.utag_link = window.utag.link;

That'll basically give you a set of utag_view and utag_link functions which will be inert if utag.js hasn't loaded, but once utag.js has loaded, they'll be repointed to be references to the built-in utag.view and utag.link functions. Then any time you want to trigger a link event, use utag_link - if Tealium is there, it'll be routed via the utag function, otherwise it will fail gracefully. If you were to later change your tag management vendor, you could just repurpose those two functions and point them at the alternative vendor.

The other approach is to build all of your tracking within Tealium itself, so never fire events from the page, but rather create event listeners. In our case, we used custom attributes against on-page elements, for example:

<input
  id="0.1.1.1.2"
  name="txtTitle"
  data-analytics-narrative="Customer Title"
  data-analytics-tracking="full"
  data-analytics-persist="customer_title"
/>

Those attributes describe the field in question in a reporting-friendly way, the expected behaviour for an event (do we capture an interaction, capture the value of the interaction, or capture nothing?) and the UDO variable into which we might persist the value thereafter (if needed).

Then we used jQuery to track blur events against input elements, registering the event handlers in a Tealium extension, and used the custom attributes against the element in question to populate the event payload before pushing it into utag.link, all within Tealium extensions.

Hope that's of some use..

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Tealium Employee
You can indeed use Tealium extensions to perform all your event tracking meaning that there is no external event code required and it is all contained within utag.js. There are quite a few setups like this normally when the customer does not have the ability to make changes to their web properties other than adding the utag.js file.

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Gold Contributor
Gold Contributor

Thanks a lot for all your replies, your replies help me to solve the problem.

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Moderator
Moderator

OOOooooooo @TracyAu. I'd accept some of the replies as solutions. #hinthint #winkwink

#hugs

If you liked it then you should have put a kudo on it!

Any other way for link tracking/event tracking without the use of utag.view() and utag.link()?

Community Manager
Community Manager

Just to close the loop on this thread. The best way to implement event tracking without coding your site with calls to utag.view() and utag.link() is to implement a combination of HTML5 data attributes in your page code and the jQuery Extension in iQ.

More info here: Event Tracking - Understanding Your Options

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.
Public