I have several exit links on my site so I have enabled automatic outbound tracking. The problem I have is that I want to implement a success event for when one of these exit links is clicked. I have set up a rule in Tags to send the success event to AA when this exit link is clicked. I configured the send beacon action with the s.tl() exit link option. The problem is that there are now two (identical) server calls whenever I click on the exit link (both including my success event). If I disable the rule then there is only one server call but without my success event. I don't want to disable the automatic outbound tracking because I have many other links that I don't want to be tracking manually, it is only this one that needs to be accompanied by a success event. I would appreciate any ideas on how to solve this.
Solved! Go to Solution.
Views
Replies
Total Likes
Since you are trying to add an event to ALL exit links (I assume based on your description)
In your Adobe Analytics Extension, custom code, you can add this:
s.usePlugins = true; function s_doPlugins(s) { if (s.linkType === 'e') { // this checks if this call is an exit link call. s.events = "event1"; s.linkTrackEvents = "event1"; s.linkTrackVars = ""; } } s.doPlugins = s_doPlugins;
This will attach "event1" to ALL exit links, as part of the default exit link tracking. You can also add correlation props and eVars (assuming the values are still set) by listing them in s.linkTrackVars if you want (however, if you cleared you variables after the page load, this may not work... I clear my vars before the page view calls, so that my variables are still available to me here.
s.linkTrackVars = "server,list1,prop1,eVar1";
If you don't need any variables to be added, just the event, you can leave s.linkTrackVars right out.
Views
Replies
Total Likes
What if you set a direct rule rule on the specific link click and just use it to set an set variable (event number in your case). the the exit link would hopefully just add the extra event in its beacon. The only challenge is ensure set variable fires before exit link i rule fires.
Views
Replies
Total Likes
Since you are trying to add an event to ALL exit links (I assume based on your description)
In your Adobe Analytics Extension, custom code, you can add this:
s.usePlugins = true; function s_doPlugins(s) { if (s.linkType === 'e') { // this checks if this call is an exit link call. s.events = "event1"; s.linkTrackEvents = "event1"; s.linkTrackVars = ""; } } s.doPlugins = s_doPlugins;
This will attach "event1" to ALL exit links, as part of the default exit link tracking. You can also add correlation props and eVars (assuming the values are still set) by listing them in s.linkTrackVars if you want (however, if you cleared you variables after the page load, this may not work... I clear my vars before the page view calls, so that my variables are still available to me here.
s.linkTrackVars = "server,list1,prop1,eVar1";
If you don't need any variables to be added, just the event, you can leave s.linkTrackVars right out.
Views
Replies
Total Likes
Views
Likes
Replies