Site Catalyst Link Tracking - Javascript on Click

Employee Emeritus
We are going to be adding replacing our legacy Site Cat code with Tealium on one of our applications and I am hitting unfamiliar territory. The application has many download links. When I hover over the links for the downloads I see the following javascript:void window.open('ProdDownload.asp?ElectronicFulFillID=34163','ef') The HREF in the source code for the example above is as follows: CP-PPF-BRC001.pdf After clicking on a link a new page is generated with the PDF https://fulfillment.lfg.com/CF/LFG/EF/28028/cp-ppf-brc001_z03.pdf We do not have our Tealium tag on the application yet so this is a bit premature but I am assuming that this would not automatically be captured with the autolink tracking and we would have to have a custom extension that would capture the "CP-PPF-BRC001.pdf" on click. What would be the best way to approach this?
5 REPLIES 5

Site Catalyst Link Tracking - Javascript on Click

Employee Emeritus
Hi Jim, good to hear from you! I'll take a look at this and get back to you!

Site Catalyst Link Tracking - Javascript on Click

Employee Emeritus
Hey Jim, Just to make sure we're testing correctly, are you wanting the CP-PPF-BRC001.pdf value passed into the "pev1" parameter of SiteCatalyst?

Site Catalyst Link Tracking - Javascript on Click

Employee Emeritus

Hey Jared, Thanks for the response. We would map it to prop2 and eVar3. Similar to what we did here - https://community.tealiumiq.com/t5/Tealium-iQ/Downloads-extract-file-name-and-map-within-AppMeasurem....With our legacy code in place - this is what the params look like: AQB:1 ndh:1 t:30/0/2014 15:33:24 4 300 vid:1595483 ns:lfg pageName:Fulfillment:noView.asp g:https://fulfillment.lfg.com/noview.asp?MostPopular=yes cc:USD events:event7 c2:javascript:void window.open('ProdDownload.asp?ElectronicFulFillID=34163','ef') v3:javascript:void window.open('ProdDownload.asp?ElectronicFulFillID=34163','ef') c15:Fulfillment:noView.asp pe:lnk_d Does this help? Thanks

Site Catalyst Link Tracking - Javascript on Click

Employee Emeritus
Hey Jim, if you give me your Tealium user id (e.g. jim@lincoln.com) I can share my profile with you to help with this (you can email me at roshan@tealium.com). You'll be able to see the following extension which attaches an event handler to trigger the 'download' event when people click on links with an href which contains 'javascript' and 'pdf'. However, you can change the criteria there yourself using jQuery: http://www.snipsave.com/user/profile/roshangonsalkora#7018 Take a look at this URL: http://roshanissuperawesome.co.uk/demo/demo_page.html?test=sitecatalyststandard&env=prod If you click on the 'Example PDF' you'll see a standard PDF link with a standard 'automatically tracked' download via SiteCatalyst's library. However, the link underneath won't get automatically tracked - the extension above is at work here to pull the values you want (try clicking on it). The extension sets the following two variables which are automatically mapped to SiteCatalyst to be handled correctly: link_name sets 'pev2' the name of the link link_type sets 'pe' to 'd' (ie 'Download') I've also set an extra two just to pass in some additional information: link_url sets 'prop53,eVar53' to the download URL download_type sets 'prop54,eVar54' to specify that it is a javascript download (as opposed to a standard PDF download). I'm figuring out the value of all four of these via jQuery in the extension before passing a 'link' call via utag.link() with the 4 data sources 'link_name', 'link_type', 'link_url' and 'download_type'. If you check out the 'SiteCatalyst : standard' tag you can see that I've mapped these Data Sources to SiteCatalyst props and eVars too. Mapping http://note.io/1kEXs3D Screenshots of calls: Auto-tracked download : http://note.io/1kEV4Kq Tracked-via extension download : http://note.io/1aWmnPH Does this make sense? Let me know if not!

Site Catalyst Link Tracking - Javascript on Click

Employee Emeritus
Thanks Roshan. This does make sense and is a huge help.
Public