This is the situation you find yourself in…
- You have a website or page through a platform that doesn’t let you add or touch any code. It lets you add your Google Analytics tracking ID.
- You want to track clicks on a specific link – that you control – that tells you a user has shown interest or started an important process. Your GA code does not run on the page you’re linking to.
- You’ve noticed that GA4 will automatically track external (or “outbound”) clicks…. but this important link is still on the same domain. It never gets automatically tracked.
Your hands are tied… right?
Nope! (And when you see what the answer is, you’re going to kick yourself…)
Is this a tip for Etsy? No, this technique is rarely going to be useful for an Etsy shop. You don’t control any super-important links. But who knows – maybe someone will have a use for it?
You have a website (a page… a shop…)
You have a website – or maybe just a single page – that runs on a platform that claims to give you Google Analytics. But all you can do is plonk your G-code tracking ID in a setting somewhere and hope for the best.
You can’t install Google Tag Manager. You can’t add any custom code at all. You definitely don’t have access to the underlying code of the platform.
And maybe… even if you did, you wouldn’t know how to use it.
You want to track clicks on a very specific link
Ultimately, you want to track when the user completes an important action that tells you they did the thing. They completed the task, they bought the product, they registered – whatever your business goal is.
But your platform is restrictive and the “Google Analytics integration” doesn’t track this for you.
You need to go second-best. Maybe track when the user starts the process, enters the funnel or indicates that they’re about to buy.
In your situation, there is a link somewhere that takes them to the start of this “important action”.
There are a few prerequisites for this to be a good solution for you:
1. The link is on the same domain as your website.
If your shop is www.example.com/pages/my-page
, the link should go to someplace like www.example.com/checkout
. Both of these URLs are on the domain “www.example.com”
2. The link takes them to a place that does not run your Google Analytics code.
This is the reason you need to track the click and not simply when someone views the destination page.
(Even if you want to track views of the destination page when the user has come from a specific page (i.e. where the link/button is), you can still do that in a better way. Create a custom event from a page_view event with the appropriate page_referrer value.)
3. You control the link destination.
By “control”, I mean that you can edit the URL of the link or button and paste in anything you want like https://some-other-website.com
.
Google Analytics 4 can automatically track outbound clicks
GA4 has a very very handy feature of automatically tracking more visitor behaviour than just “page views”. You can now enable the automatic tracking of scrolling, file downloads, video plays, form submissions and yes – “outbound” clicks.
Find out how to enable it on your GA4 Data Stream.
Great. Fantastic. But this is not an outbound click.
GA4 detects outbound clicks by seeing if the destination domain matches the page you’re on. It does not matter whether your GA code is running on the destination page. If the domains match = internal click.
Ok… so just make the domains not match?
This is it! This is the solution! If GA wants the domains to not match, make them not match.
YOU control the link, so you can make that URL whatever you want.
Throw that original destination URL into a redirect-maker of your choice (UTM.io, bitly, rebrandly… any reliable one) and create a URL that goes to the same place but uses a different domain.
Then replace the original link with the redirect.
Google Analytics will then detect those clicks as outbound clicks.
You can then create a custom event on click events where the link_url equals your redirect URL.
If it’s a particularly important action, make this new custom event a “Key Event” (or conversion event) so it appears in your GA reports within the Conversion Rate.