Creating a Custom Clicked Element by Link Extension
We have hundreds of eCommerce product pages with different types (.pdf, .skp, .doc, .dwg, etc.) of support documentation on each. I want to set up link click event tracking to track when each type of a file is downloaded.
Tracking by ID and Class is too broad. I believe/hope I can do it using a jQuery selector. I just don't know what I need to enter as the jQuery selector when setting this up in HubSpot to track the links properly. Can I track by something along the lines of link contains .dwg and what would I use?
Would this be what I use: a[href$=".pdf"] to rack .pdf link clinks?
Note: These pages and files are not hosted on HubSpot, but HubSpot tracking is on the page.