Discover more from WiFi Money
Substack Google Analytics Issues
Today I wanted to send a quick Substack explaining two issues I found with Substack’s Google Analytics implementation. If you’re not completely familiar with the Substack platform, here’s a FAQ on Substack.
Generally I write more *actionable* articles for you all but I thought that these issue might give you a better understanding of how Google Analytics and Google Tag Manager works.
Both of the issues I found have the same solution, so let’s dive in.
Substack Utilizes an Iframe For Email Signup
The first issue is only applicable is you have an email collection form on a separate website. An Iframe is essentially a web page inside of a web page.
When bowtiedopossum.com loads, it also loads up bowtiedopossum.substack.com.
This is an issue because when bowtiedopossum.substack.com loads, my Google Tag Manager fires and deploys the Google Analytics Universal Analytics and GA4 tags from my Substack page.
Note: If you’ve followed my guide, you’re deploying GA via GTM. In this instance, GA doesn’t actually live on your site. GTM lives on your site and deploys GA *under certain trigger configurations*. This will be important below.
The ideal solution here is to not have the email capture as an Iframe. Since I’m not about to hassle the devs and analytics teams at Substack to get this fixed, it’s up to me to find a solution.
Google Tag Manager Deploys on Writer Pages
The second issue with Substack’s implementation of GA or GTM codes is that it deploys on every page of your subdomain. Given the writer of the Substack likely spends a lot of time on their platform, there’s a lot of “visitors” and “pageviews” that shouldn’t show up because it’s actually the writer.
This can be filtered in UA (Universal Analytics) through excluding your IP address in views but not as easily in GA4.
The real solution should be to have the platform check whether the admin of the subdomain is logged in and if so, don’t implement the tags.
Again, I’m not about to hassle the devs so I built an *almost* perfect solution to bypass these two issues.
First, you’re going to want to go to your GTM tags. The tags should have an “All Pages” firing trigger.
Mine below have a “Page View Trigger” since I’ve already changed it.
Then click into the trigger and change it to a “Page View” trigger. Then change the trigger from firing on “All Page Views” to “Some Page Views”.
Lastly, you’re going to want to add the below conditions to the trigger.
What these conditions do is tell Google Tag Manager that the below tags should *only* be fired when the conditions are met.
The first “Page URL” above excludes the embed page that is firing on your secondary website through the embedded form. The GTM container will still fire, but no analytics tags will fire and pass data back to GA.
The next two URLs are URLs that only the writer has access to. Hence filtering out the majority of the writer’s traffic.
The one problem with this solution lies in the fact that the home page (bowtiedopossum.substack.com) and the actual posts are still included. If you or I go to the homepage or posts, the tag will still fire. It could be excluded, but then you’d miss out on see the analytics of users that visit that page.
I hoped you learned a little more about GTM and the fact that it is way more powerful than just implementing marketing tags that could very easily just go into the header.
If you’re subscribed to this newsletter, you need to keep in mind why we’re here.
Your boss and company, no matter how nice, doesn’t care about your future. Nobody outside of a few family members and select friends care about your growth and your future.
You are the only one that can save yourself and make your life what you want it.
Single player. Just you.
This Substack is here to help you build a business and build the life that you want. I’ve laid out the basics to understand, analyze, & grow most any online business.
Free articles on WiFi Money are supported by:
►SiteGround - SiteGround is one of the easiest hosting providers to get setup on quickly. For a full guide in getting setup with your first website in less than an hour, read how to start your own website.
►Shopify - The #1 and only ecommerce website builder that you should be using. If you’re selling a physical product online, look no further. They handle 90% of the hard stuff. Start building on Saturday morning and be selling by the afternoon.
►Surfer SEO - Save hours by using Surfer SEO to prepare content optimized to your domain, niche, and audience. Use the #1 AI writing tool on the market that the best affiliate marketers are using.
►SEMRush - The one tool I cannot live without. This tool has almost everything you need. Keyword research, spy on your competitors, local SEO, site audits, social media management, paid advertising tracking, PR monitoring and much much more.
Disclaimer: Nothing written here should be construed as legal for financial advice of any kind. These are opinions and observations, written by an anonymous cartoon Opossum, built up over years working in e-commerce & affiliate marketing.