Best practices implements events

Silver Contributor
Silver Contributor
what are the best practices to implement events in Tealium, use utag.link or personalized functions for each event?
the utag.link is in the onclick of the button, is it a best practice?
3 REPLIES 3

Best practices implements events

Best practices implements events

Silver Contributor
Silver Contributor

Hi Paul,


I have already read these articles, but it hasn't got the information that I need.

Normally I use utag.link for events, but I have seen that other people use personalized functions like downloadpdf().

 

What is better?
How can I configure these personalized functions?
is it correct the use of utag.link in the onclick of the button?

 

I need the same for implement AJAX pages (utag.view or functions)

 

Thanks for your help.

Best practices implements events

Gold Contributor
Gold Contributor

@evelin, personlized events as you specified are things that your developer use to define the custom behavior on your site. the downloadpdf function might trigger a dialog which enables you to download the pdf. Within this function you can ask to add the utag.link code so that each time the downloadpdf funtion is called you will also trigger a request with tealium. The same principle applies to Ajax calls wherebye the utag.link call should be added into the success event handler of the ajax call.

Using directly onclick (which you should never do!use addEventListeners!) is possible but not really for ajax calls. Check with the developer for a good solution.

Public