Tracking events is one of the best ways to understand the user actions on your website, such as the number of times a button clicked, a form submitted, or documents downloaded. In this blog post, we show how to measure the number of clicks on call-to-action buttons.
Integrating Google Tag Manager on your website is very easy. Here are three steps below explaining how.
1. Create Google Tag Manager Account
Go to Google Tag Manager and click "Register Now." We recommend using your current Google account, which is also used for, for example, Google Analytics. Then you're logged in and click "Create Account."
After going through the steps, you will see a popup containing the container code. This code must be posted in your website as indicated. The <script>code>part of the JavaScript snippet <head>code> is placed in the html output section of your web page. The noscript>section must be taken <body>code> immediately after the tag is opened.
2. Create tag
You can quickly and easily create event tags using built-in variables. In this example, we'll show you how to implement an event after clicking the "Learn More" button. Tracking events starts using "Click" triggers. Therefore, first make sure that all your click variables in the Variables menu are checked before creating event tags:
Then create a new tag in Google Tag Manager. You can do this by selecting the "New" option from the tag menu, and choose the Universal Analytics tag. You will then need to fill in your tracking ID of the google analytics property you want. You can find this in Google Analytics by clicking on "Property settings" under "Admin."
Change the tracking type to "Event" and fill in the fields. The category can be used to indicate where an event is taking place. The promotion provides information about the user action on your website. In this case, the user clicks the "Learn More" button, which is why the action and category get that name. The label should provide us with information about what was clicked on. Choose the {{Page Path}} variable here if the button appears on multiple product pages. For example, Google Analytics lets you find out which URL the button was clicked on. The tracking parameter configuration looks like this:
Click continue.
3. Create trigger
Next, you'll need to select, which requires this tag to be activated. Therefore, open a new tab in Google Tag Manager. Go to triggers, and then click "New." Call this trigger 'Generic Click Trigger'. Then choose as trigger type "Click - all elements" and "All clicks."
Before you publish your created trigger, we recommend testing it thoroughly before polluting any data in Google Analytics. This can be done with the built-in debugger. This feature can be found in the upper right corner of Google Tag Manager under "Publish."
Open the page on your website where the button is located. If it was already open, click refresh. In test mode, you get an overlay on your website to be tested. You can then test any trigger created to test whether it is activated correctly. Then click the button you want to measure. This action now appears in the overlay. To check, go to "Variables."
In this example, the button on our website has the unique condition class="more information". This means that we can use the built-in variable "Click Text" to filter this trigger. Go back to Google Tag Manager and open Generic Click Trigger. Change the name of the trigger. Set the trigger activation condition to "Some clicks." You'll see a new selection field where you can enter the activation conditions. In the trigger configuration, we set the condition "Click text corresponds to more information." The completed trigger looks like this. Then save the trigger.
Open the tab with the tag. Choose the trigger you just created. The tag looks like this:
Save the tag, preview it, track down errors in test mode, and publish the tag.
Tip!
You can also find the results in Google Analytics under real-time. To measure conversion rates in the long term, you can set the events as a target in Google Analytics.This was just one of countless features with Google Tag Manager. The bottom line is that pretty much everything can be made measurable with Google Tag Manager. We encourage everyone to use Google Tag Manager to easily gain valuable insights.
Did you find this interesting?
Subscribe now and receive relevant marketing & social media tips from practice simply via email. Don't miss this.
Ontvang 1x keer per maand online marketing tips