Google tag manager is a simple way to deploy tags to your website that allow you to track all sorts of things. Sign up if you haven’t already and if you’re using WordPress use this plugin to get the tag manager container onto your website.
It’s really important to understand the interactions that people have on your site and tracking how many people actually click your links e.g. the one above.
Step 1 ) Configure your variables
To track outbound link clicks we’re going to use two inbuilt variables within tag manager. Click URL and Page URL.
On the left hand side click variables -> built in variables -> configure and select the Click URL & Page URL
Step 2) Create a trigger
Click on triggers -> new.
Under trigger type select click just links. Tag manager will automatically only apply this to clicks on the website when the <a href=”link”>example</a> … element is present.
Then select wait for tags and fill in the enable this trigger when the following conditions are true. Page hostname is essentially your domain, include your domain (exclude www.) in this field as we want this trigger to be enabled on all site URL’s.
Finally set the firing to occur on some link clicks when the link that’s clicked doesn’t include your hostname i.e. outbound links.
Step 3) Create the tag
Click on tags -> new.
Select your tag from the list -> universal analytics
Set the track type to event. Then configure how you’d like GA to track the event, set the category to Outbound and then set the action to your Page URL variable and the label to your Click URL variable. This way you’ll be able to see which pages drove the highest number of outbound interactions.
Once this is complete you’re good to go in publishing your tag.
Just make sure you also have a GA tag on the site which is registering all pageviews.
Any questions let me know!