For many actions on the page, tracking should not be treated like a page view. In this video, you will learn how to code a link tracking beacon to Analytics, if you are not using a tag manager (like Adobe Experience Platform Launch). See the code, as well as learning an important tip.
There are two functions that send data into Adobe Analytics:
In this video, we show you how to code a custom link hit when you are NOT using a tag manager like Adobe Experience Platform Launch. We recommend that you use Experience Platform Launch, our best-practice recommendation for implementation. However, if you need to code in an
s.tl(), here’s how to do it.
Here is the sample code used on the custom link in the video:
<a href="#" onclick=" s.linkTrackVars='events,eVar2,prop2'; s.linkTrackEvents=s.events='event2'; s.eVar2='facebook share'; s.prop2='facebook share'; s.tl(this,'o','Social Share'); s.manageVars('clearVars',s.linkTrackVars,1);"> Click here to share on FaceBook </a>
For more information on custom links, please see the documentation.