So I have my Google Analytics account connected through the Dashboard, but apparently that only tracks incoming traffic and I can’t track outgoing links unless I add some code for their Tag Manager.
So where exactly would I want to add this code so I can start to track a handful of important links?
Google Tag Manager says:
Add the tag directly to your site
If you have added the Analytics tag directly to your site, you can copy and paste the script below into your own pages to set up Event measurement for outbound links. You should add this script in your page header, but not within the basic Analytics tag.
If you copy and paste this script exactly as it appears here, your outbound clicks will appear in your Analytics Events reports with a Category of “outbound” and an Action of “click”. (In the snippet, these are shown in bold .) You can use these values, or change them and define your own values.
You’ll also need to add (or modify) the onclick attribute to your links. Use this example as a model for your own links:
So what file do I want to modify to globally track the links I’ll specify within that piece of code?
I should only have to add this to one place to track them globally right?