How to install Clicky tracking via Google Tag Manager
Although easily installable on its own, Clicky can also be installed using Google Tag Manager. And this process just got easier thanks to a team of Google Tag Manager experts that created a community template for this.
There are both pros and cons of using a Tag Management System to manage your tracking and marketing scripts but if you already decided to use one, then this post is for you as in it will explain how to install Clicky with the help of Google Tag Manager.
The process of installing Clicky tracking via Google Tag Manager follows 3 important steps:
- Defining the website elements that need to be tracked;
- Adding pageview tracking;
- Adding additional actions and goal tracking;
Defining website elements that need to be tracked
For this post, lets imagine that we own a dental practice and our website is used to showcase the services we provide and drive clients to our clinic.
We can continue our imagination exercise and imagine that we also have a services page, a phone number in the header and a contact form which clients use to contact us. We also have four links to our social media profiles in the footer.
So these are the main elements we need to track on the website.
Adding pageview tracking
Since most built-in metrics and dimensions are measured with a pageview hit, installing this type of tracking is the first and most important step in getting our website tracked in Clicky.
To add the pageview tracking, first, we need to import the Clicky tag template from the GTM community templates.
For this, in GTM, from the Tags menu, click on New > “Choose a tag type to begin setup” > “Discover more tag types in the Community Template” and search for “Clicky”.
After finding the Clicky tag, click on it and from the next screen, click on “Add to workspace” to import the template in your GTM workspace.
After importing the tag to your workspace, GTM will redirect you to a new tag with the Clicky tag set as the predefined tag type.
In here, you need to enter your Clicky site id (you can add multiple ids in case you need to send data to multiple Clicky profiles), select the default “All Pages” default trigger, give the tag a descriptive name such as “Clicky – Pageview” and save it.
If you want to view initialization messages and the actual hits which are sent to Clicky, you can enable “Log debug messages to browser console”.
Optionally, if you want to send custom parameters to Clickly (like custom page name, URL, etc) you can create a variable that holds this data as an object, and select it in the “Custom tracking” option from the Clicky GTM tag.
After this, the pageview tracking should be ready and you can publish the changes in your GTM container.
With this tracking installed, you will get valuable information about how users are using your website and start making more data driven decisions.
However, if you need more information and want to track if users are clicking on your social media links or submitting the contact form, then we need to add additional actions and goal tracking.
Adding additional actions and goal tracking
On our imaginative site, we also wanted to track clicks on social media links and contact form submissions, so for this, we will use Clicky actions and goals.
Clicks to social media accounts can be tracked as an action while contact form submissions can be tracked as a goal.
Tracking social profile link clicks
To track social media clicks, first we need to create a new Clicky type tag with the “Hit type” set to “Action log”.
Then, in the “Href parameter” we need to add the {{Click URL}} GTM built-in variable while in the “Title parameter” field, we need to add the {{Click Text}} built-in variable.
Since the action we are tracking is a click, we can leave the “Type parameter” blank as it defaults to “click” when left empty.
For the trigger, we need to create a new trigger that will fire when a user clicks on a social profile link. We can use a “Click – Just Links” trigger type for this, with the “Click URL” variable set to match the regular expression “facebook\.com|twitter\.com”.
This is a basic trigger that will fire every time a user clicks on a link that contains facebook.com or twitter.com.
In case you have other links to Facebook or Twitter on your site, you will need to adjust this trigger as it might also fire for them.
Now that we have the trigger created, we can use it to fire the social click action log tag we created earlier.
Adding the contact form tracking
Since submitting the contact form is usually considered a conversion, we need to track this user action as a goal.
The process of creating the contact form tracking tag is similar to creating an action log type with the only difference being the tag type and trigger.
So for our contact form submission tag, we need to create a new Clicky type tag with the hit type set to “Goal log”.
Then, in the in the “Goal Id” field, we need to enter an id or a name for our goal. Optionally, we can also set a revenue value for this goal.
In our example, we will set the id to 1 and the revenue to 100 as this is how much we estimate that each contact form submission brings us in revenue.
Next, we have to create a trigger that will fire when the contact form is submitted. For this we need to create a form submission type trigger with “Form ID” variable set to the id of our contact form, which, in our example is “contact-form”.
Once we created the trigger, we can add it to the “Clicky – Contact Form submission goal” tag and save the changes.
Tracking contact forms is no different than tracking other types of online forms, so if you have a newsletter or a registration form, you can follow the same steps to install the Clicky tracking for them.
Testing and publishing
After adding the pageview tracking and implementing social media click and contact form submission tracking, we need to test them by enabling the preview and debug mode in GTM.
With the preview mode enabled, we need to go to our site and click on the social media links and submit some contact forms. If the triggers we created are correct, we should see the Clicky tags firing.
If everything fires correctly and you see data in your Clicky profile, you can go ahead and publish the changes in GTM by clicking on the blue “Submit” button from the top right corner.
With this, the pageview tracking, social profile clicks and contact form submissions tracking should be working for all users visiting your site and in few hours, you should see the collected data in your Clicky account.
So the only thing left to do is to analyze the data – the reason you installed Clicky tracking in the first place!