This feature is only available in the Pro version of Independent Analytics.
Here is a link to the debugging guide referenced in the video.
Click tracking in Independent Analytics Pro is controlled via the Click Tracking menu, so that’s where we’ll begin this tutorial.
How the Click Tracking menu works
The Click Tracking menu displays a list of “link patterns.” Whenever a visitor clicks on a link that matches one of these patterns, the click will be tracked.
For example, the first link pattern is named “Buy Now,” and it will be triggered whenever a link with the class “buy-now” is clicked.
As another example, the second link pattern called “PDF” will be triggered whenever a visitor clicks on a link pointing to a PDF file.
Using this system, you can create link patterns that will track clicks for individual links or hundreds of links at once.
Let’s dive into each of the available link patterns and look at how they’re implemented now.
Link Patterns
Most of the link patterns start working automatically once configured in the Click Tracking menu.
However, the Class link pattern takes a bit more work, so we’ll cover this one first.
Class
Tracking links by class is the best strategy if you want to measure clicks on a single link. For example, if you have a signup button on a landing page, you could easily add a tracked class to it.
You can track clicks on the signup button by adding a new Class pattern, like the example below:
The pattern is named “Landing Page Signup Button,” the Class type is selected, and in the value field, the class name given is “track-signup-button.”
If this class is not already on the signup button, then the last step is to add the class to it.
We have a tutorial here on adding classes to links via the Block Editor, Classic Editor, Menu Editor, Elementor, and manually with HTML.
Once the class is added, you’ll begin seeing click data enter the Clicks report.
If your clicks aren’t showing up, follow our click debugging guide to make sure the class is implemented properly.
Extension
The extension pattern tracks clicks on links pointing to files. For example, if your site has downloadable CSV files and you want to see how often they’re clicked, you could do so like this:
As long as the links point directly to a CSV file, their clicks will be tracked. This works whether the file is hosted on your website or if you’re linking to a file hosted elsewhere.
With just one file extension pattern, you can monitor clicks on hundreds of links across your website.
Since it’s common to track PDF and zip file downloads, Independent Analytics Pro tracks these two file types by default, but you can remove those patterns if you’d like.
Subdirectory
The subdirectory link pattern is especially useful for tracking affiliate links, which are commonly redirected through a local URL.
For example, imagine you’re linking to a product through this URL: https://yourwebsite.com/go/product-x
You could track these clicks by adding a subdirectory link pattern like this:
Now, every time a visitor clicks on a link that goes through your /go/ subdirectory, it will show up in the Clicks report like this:
The Target URL column in the table lets you distinguish between your links. Using the example above, you could filter the Target URL by links that contain “green-tea,” and then you’d only see stats for the second link in the table.
With this system, you can track all of your affiliate links within a few seconds of configuration and then use filters to dig into your data later.
Domain
In our experience, tracking all outbound clicks creates a lot of clutter. It’s not helpful to see clicks to Wikipedia and other sites you linked to in your content. That’s why we included the domain pattern instead.
By using the domain pattern, you can track clicks that point to specific domains only. For example, let’s say you have an Etsy shop, and you frequently link to your store. You could quickly track clicks on all links pointing to Etsy like this:
If there are any links to your store that you want to track separately, you could add a tracked class to those links instead.
Important notes
To use the click-tracking feature in Independent Analytics Pro successfully, there are a few other things you should be aware of.
Clear the cache after making changes
Whenever you make a change to your tracked links, please remember to clear your site’s cache so that these updates make it into the tracking script that IA Pro adds to each page of your website.
If you are using a CDN like Cloudflare, you may need to clear your site’s cache via your caching plugin first and then empty the CDN cache.
Click data is synced every 60s
Click data is synced once every minute with the database, so please allow for that delay when testing a new link pattern on your site.
Archive links if you want to stop tracking
If you no longer want to track clicks for a certain link pattern, you can click the Archive link next to it. We have a tutorial on archiving links here if you want to learn more.
Right-clicks are tracked too
Both left- and right-clicks are tracked. This is important because a lot of visitors may right-click links and choose to open them in new tabs or right-click a PDF and choose to download it.
Clicks can be counted multiple times in the table
Let’s say you’re tracking clicks on PDF links, and you’ve also added a tracked class to a link that points to a PDF. When somebody clicks on this link, it will be counted as one click in the Quick Stats and chart, but you’ll see two clicks in the data table. This is because both the tracked class and PDF pattern get credit for the click.
Drag-and-drop to rearrange link patterns
You can drag and drop the link patterns into a new order by clicking and dragging them anywhere besides the Edit and Archive buttons.
Debugging
If you are having trouble getting your clicks to track, please follow all the steps in our debugging guide.