How do you set up external link click tracking using event tracking in Google Tag Manager (GTM)?

You can use GTM to set up a trigger for the link click based on the ID or class for the link, or for the link URL, or even the text of the link. Once you've set up the trigger in GTM, you can create an event in GTM to send the data to your Google Analytics (GA) account.

When you are setting up your event code for GA inside GTM, you have the opportunity to add a category - action - label for the event. We discuss this inside Tag Manager Mastery Course GTM Course in the Event Tracking lesson.

The category/action/label values can be anything you want them to be, either a value you enter or a variable. In this case, you would want to use a variable, and you can likely get by with a built-in variable from GTM for the Click Class or Click ID. You can try doing this in your tag with the built-in variables, then confirm you are getting the value you want using preview mode in GTM, this will allow you to test before putting on your site.

I also recommend using the GA real-time reports on an unfiltered view to make sure the event looks exactly how you want it to in your reports.

Learn more and enroll in our Tag Manager Mastery Course.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Data Driven Contact Data Driven