Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Lorem ipsum dolor sit amet, consectetur.
Contact us now +1128 5255 8454
[email protected]

Instagram Feed

How To Create Click Events in Google Tag Manager

Your site’s SEO strategy runs on data. You need to see how much organic traffic and conversions your efforts produce so you can adjust your plan accordingly.

With Google Tag Manager, you don’t need to be a wizard in data analytics to track your site’s performance. Google makes it simple to monitor your site visitors’ actions, such as form submissions and clicks, and condense JavaScript into one to improve page speed–all without help from your development team.

Ready to get started? Learn how to track clicks in Google Tag Manager with our step-by-step guide below:

Step 1: Creating a Google Tag Manager Account

After logging into your Google Tag Manager, click “create account” at the top of your dashboard. Name your account and add your site’s URL in the setup container field. Then, click “Web.” Read and accept the service agreement.

Google Tag Manager Screenshot

Step 2:  Adding your Google Tag Manager Code to Your Site

To install the Google Tag Manager to your site, you will need two things. First, add the GTM script to the <head> code of your site as high as possible. Then, you will need to add another snippet of code to the main <body> of your site.

Google Tag Manager Screenshot 2

Step 3: Creating a Trigger in GTM

Your account should now be created, and you will see an option for “Triggers” on the left panel.

Google Tag Manager Screenshot 3

While you are in the Triggers workspace, click the “NEW” button and name your Trigger according to the Event you will be creating. In this case, we will be tracking clicks for a user clicking on a “Learn More” button.

Then you will need to add “All Elements” under “click” from the right panel of Trigger Types.

Google Tag Manager Screenshot 4

For now, we will set up the trigger to execute on “All Clicks,” but this will change when we come back to this setup in the later steps. Now, you should see a created Trigger in your workspace.

Google Tag Manager Screenshot 5

Step 4: Setting up GTM Click Variables

Navigate to the “Variables” tab on the left panel and click Configure. The right panel should pop up, and now you will be able to activate all of the boxes under “Clicks.”

Google Tag Manager Screenshot 6

Step 5: Setting up Tags in GTM For Event Clicks

Click “Tags” on the left panel and create a new Tag. When the right panel pops up after clicking into Tag Configuration, click “Universal Analytics.”

Google Tag Manager Screenshot 7

Under the Track Type drop-down menu, click on “Event”. You will then see fields appear that need to be filled out. Under the category field, type “button click” (since we will be tracking when a user clicks on the “Learn More” call-to-action).

Under the Action drop-down menu, you can type something like “Learn more”, since that is what the CTA says. Or, you can pick the {{click text}} in the autofill options to the right of the parameter field.

Finally, under the Label drop-down menu, pick the autofill option for {{Page Path}}. This option will automatically fill the “Label” as what URL the Link was clicked from.

If your Analytics UA code is not already installed in your GTM account, you should do so now, but you can also click the box for “enable the overriding settings in this tag” and add your UA code in this field.

Make sure to click Save in the top right corner.

Google Tag Manager Screenshot 8

Step 6: Connecting the Trigger to the Tag

Go back to the main workspace for your account and click the “Preview” button (next to “Submit”) in the top right corner. Now, go to the site’s page where the event click will be firing, and you will see a GTM preview window at the bottom of your screen.

Google Tag Manager Screenshot 9

Since we using the Learn more CTA on this page, we’ll be clicking that button. Hold Ctrl and click the CTA so it does not switch your current window. Now, you will see a new element on the “Summary” tab on the left called “gtm.click” Click on this tab. You can also expand into the “Variables” section.

Google Tag Manager Screenshot 10

Here, you will locate any of these fields that are unique to only that button. In this case, the “Click Text” is our unique field that is not on any other button throughout the site. Highlight and copy that field’s text and go back to the GTM Trigger workspace.

While in the Trigger options for your Event click, change the “All Clicks” to “Some Clicks”. You will see a few new options pop up. This is where you can paste the unique field you copied from the GTM preview window. In my case, I will add “Click Text – Contains – Learn More”. Now you can refer to the associated Tag that you created.

Google Tag Manager Screenshot 11

Click “Save”, then go back to the main workspace and refresh the preview mode. Visit the URL you are testing the Event click on, and refresh that page. Click the button you are tracking, and if it’s working correctly, you will see the Tag which you created firing at the bottom of the page.

Google Tag Manager Screenshot 12

Step 7: Syncing Click Events To Google Analytics

Now that you see your Event click firing, we now can see the Event in Analytics. Go to your Google Analytics account associated with the same UA code provided for the Event. Go into the real-time reporting and click on events.

Google Tag Manager Screenshot 13

How To Create Click Events in Google Tag Manager

You can now see that the events are properly firing and tracking correctly in Google Analytics. Now, let’s tie them into a goal to track as a conversion.

Go to the admin > Goals section and create a new goal. Under the step one “Goal Setup”, click “Custom” at the bottom.

Google Tag Manager Screenshot 14

Moving to step 2, under “Goal Description”, provide the name of the Goal and click “Event”.

Google Tag Manager Screenshot 15

Finally, under step 3 “Goal Details”, you only need to fill out the category field, but it has to be exactly as stated in your GTM event tag category field that you filled out in step 5.

Google Tag Manager Screenshot 16

Stuck on one of the steps? Reach out to us any time on Facebook, Twitter, LinkedIn, or via email for help setting up Google Tag Manager!