- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
01-11-2016 04:40 PM
We need to be able to track in Omniture the number of times a user clicked on a link that took them off of our site, such as by clicking on a display ad.
How would that be implemented using Tealium?
01-11-2016 05:11 PM - last edited on 05-11-2016 11:03 AM by kathleen_jo
You would use the Tealium utag.link call. https://community.tealiumiq.com/t5/uTag/utag-link-and-utag-view/ta-p/11888
Then you would map Data Sources that are called within the utag.link data object to the Omniture Tag.
Here is one example of code you could use to find all your exit links. If anyone has better code, please let me know and I can update this example.
// This code will find all anchor tags that are not pointed to your own domain
// and fire a utag.link call with the event_name and location.
// Make sure you add this code to an extension scoped to DOM Ready.
// Please note, there are all types of timing issues that can be introduced with this concept
// For example, there would not be enough time to download a JS file and execute before the page
// navitages away and cancels all the current JS calls.
// However firing off a single pixel should work. jQuery(function($) { $('a:not([href*="' + document.domain + '"])').mousedown(function(event) { // just to be safe, check to make sure we have utag
if (typeof utag === 'undefined') { return; } var link = $(this); var href = link.attr('href'); // relative links are not considered exit links
if (href.charAt(0) === '.' || href.charAt(0) === '#' || (href.charAt(0) === '/' && href.charAt(1) !== '/')) {
return; }
var locationNoProtocol = href.replace(/http[s]?:\/\//, ''); // Track the event utag.link({ "event_name": "exit_link", "location": locationNoProtocol }); }); });
01-11-2016 05:50 PM
@brian_kranson, thank you for the quick response!
What extension do I use to hold your code below? Is it the Link Tracking extension or a different one?
01-12-2016 09:50 AM
01-12-2016 01:08 PM
You can also use the 'Auto Link Tracking' in conjunction with the 'Internal Link Filters' that is available in the Sitecatalyst and AppMeasurement Tags in the Marketplace..
Here is a link to implementing SiteCat - https://community.tealiumiq.com/t5/2-Tealium-iQ-Documentation/Adobe-Analytics-SiteCatalyst-Tag/ta-p/...
01-12-2016 01:53 PM
01-12-2016 01:56 PM
@robert_sabec, we do have Auto Link Tracking enabled and Internal Link Filters set for our SiteCatalyst vendor tag, but the exit links don't trigger for some reason.
Is there perhaps a modification I need to make within the template of my SiteCatalyst vendor tag?
01-12-2016 04:47 PM
This is how I would test the link tracking on the current version of the AppMeasurement tag, sitecat will be similar - if this is not what you are seeing then I would create a support ticket to help you check your implementation and version of tag and H-code, or possibly your filter includes the link you are testing.
1) Filter your network traffic with 'b/ss'. This will help show only the sitecat pixel calls.
2) Click on 'Preserve Log' in the Network Traffic tab - see screenshot.
3) Click on an external link
When you land on the new page, the pixel for the event will still be in your network traffic log since you selected 'Preserve Log'. Inspect the pixel and you should see values generated for 'pe', 'pev1' and 'oid' in the query parameters in the corresponding pixel calls.
06-02-2020 05:40 AM
Copyright All Rights Reserved © 2008-2023