Like many people it is very nice to know which external links are the most popular on your site. This method through Google Tag Manager (GTM) is entirely free instead of paying for “advanced” accounts on plugins like Monster Insights.
What you Need:
- Google Analytics Account Code – (UA-XXXXXXXXX-X)
- Google Tag Manager Account – Here
Steps To Configure GTM
- Build an Account In GTM
- Build A Container in GTM
- Import JSON Tracking Script – Download – Right Click Save As
- Add Google Analytics Tracking ID Variable
- Publish To Live
Build An Account In Google Tag Manager (GTM)
Sign Into GTM with your Google Account – Click on Create Account

Add The Account and Container Details (Similar to screenshot)

Click Create
Agree With The Terms Of Service

You will get 2 Codes Once Completed, Install HFCM plugin (Search HFCM there is a single match)

In HFCM -> Add Snippet -> Name Google GTM Header Code -> Make sure set to run in Header -> Paste in the <head> code
In HFCM -> Add Snippet -> Name Google GTM Footer Code -> Make sure set to run in Footer -> Paste in the <body> code
Click OK to close out the code
Import JSON Container
Now you will need that JSON file you downloaded above and saved to your desktop or other location
Click on Admin -> Container -> Import

- Select File -> JSON from above
- Workspace -> Existing
- Import Option -> Overwrite

Next You Will See A Confirmation (Click Confirm)

Adding Google Analytics Tag
- Click Variables From Left Menu
- Click [ NEW ]

In the top right where it has [ untitled ] paste this text
YOUR_GA_TRACKING_ID
This isnt your UA code, just paste exactly the bolded text
Click on Variable Type [ Select Constant ] (Towards bottom on right)
In [ Value ] paste your UA code from Google Analytics
Click Save

Click Submit

Name The File [ My External Tracking Code ]
Click [ Publish ]

You are done it should show this screen, then you can close out of GTM

Hopefully this helps you start to track external links to Amazon and left you see what links are the most utilized on your site.