An Introduction to Google Tag Manager & Analytics for Substack in 2024
A corrigendum on how to set up GTM, and/or GA4 for SEO and why you can index your domain/account with one or the other.
So you actually don’t need both, and there are a few reasons why—throughout this article I’ll disclose those reasons but at the end of the day it’s ultimately up to you.
How to set up Google Tag Manager (GTM)
Log into your Google Tag Manager | Account and navigate to your dashboard.
Let’s keep it short and sweet—search engines will do the rest, there’s no secret sauce to being overlooked or under clicked. The catch is to snag your reader; entice them, or make them scroll for the keywords they’re looking for.
Subscribe | Xybercraft ™
Click Create Account
Follow through the Account Setup
Continuing to Container Setup
Choose the Web selection as your targeted platform, or if you have registered your own domain and intended to utilize application or server configuration continue as necessary—the following steps are similar.
Unless you need the raw code, close the popup, and you should see something like:
Copy your ID (I have it highlighted) you will need it for the next step if applicable.
Under or to the left of Now Editing (blue square) click Add a New Tag
Name your Untitled Tag if you’d like, and or click Tag Configuration, this is next part may be important.
The following (starting at tag configuration) is intentionally fragmentary due to the liability and legality of demonstrating illegal practices and/or violating GDPR law(s) using or abusing Google Privacy Controls; please research laws for your country.
Another reason I don’t go in depth is because Individual triggers or specific events; currency’s, marketing tactics, like logging the amount a user is willing to spend and many other aspects that can be chosen for your specific business requirements vary per case—browse the Learn More on each section for official documents and walkthroughs to match your exact need, mastering these services is a job alone.
Your Google Tag ID will not reset so you don’t have to worry about misconfiguration anything. If you notice on the screenshot above the Live Version (version 8) shows how many different times I tried different stacks to find my sweet spot; for the record I only track views for this publication and other domains I host or manage professionally.
So after the page slides open you will see Tag Configurations and Triggers, start with Configurations; which will open up many other options, the two I will introduce is:
Tag Configuration
Google Analytics (Tag Type)
Google Analytics: GA4 Event which would require your Measurement ID to continue but this is where you could kill two birds with one stone.
Enter the Event Name for your goal followed by the variable(s).
For Parameters, Variables, Properties, and Advance Settings—navigate through Google Analytics 4 in Google Tag Manager and Google | Market Platform.
Google Tag (Tag Type)
Enter your Tag ID and Variable; I’m fine with just logging views so {{page URL}} was good enough for me; Substack lists referrals for you. But {{Events}} might be up your alley.
You’ll notice there are also additional settings like (Configuration, Shared and Advance Events) with Variables and Parameters, for specific targeting i.e., bounce rate, copying part of your text, even API supported triggers to see where your videos or whatnot were paused or scrubbed.
If needed you can also customize Tag Sequencing and Tag Metadata or you can script your own code (if applicable).
<script> var m = document.createElement('meta'); </script>
Triggers
Firing Trigger are pretty self explanatory, there are correlating options depending on what you choose from your Tag Configurations. Depending on the Trigger Type you select(ed) this is where say, Consent Initialization would be chose for users agreement to the data collection you’ve set up—if it’s not blocked.
Exceptions as the name intends are used to double down on duplicate data, its purpose it quiet useful if its amalgamated correctly.
When you use advanced Tag Sequencing settings, the tag ignores its own triggers and instead fires as part of the sequence.
If you a writer—reach out to collaborate on this publication I’d be glad to work with you.
Do I need GTM for Substack?
Yes—you should use a tag for any and every domain you manage, it helps out with propagation, verification and usage statistics.
You don’t need an advanced setup to get by or to even level at the top of the search result.
How to verify you GTM is active on Substack
There are a few ways:
Add your domain to Google Tag Assistant; you can even add this publication to test if you’d like.
You can also read your page source code; scroll towards the bottom under “Why can’t I verify my Substack with GA on Search Console?” to follow needed instructions.
Or you can use Realtime Reports
Realtime reports lets you monitor activity on your website or app as it happens
For Google Tag Assistant—navigate back to the dashboard and locate Google Tag Assistant to test run some debugging.
Connect and allow the page to open,
If the tag is entered correctly you will notice on the previous window a summary section on the right side. It will monitor your scrolls, clicks, time active, etc..
Note: If you cannot connect you may need to limit your Ad, Tracker, and/or Fingerprint blockers on your browser or VPN.
Recommend | Xybercraft ™
How to set up Google Analytics (GA4) for Substack
As I mentioned above, theses services can be a full time job from setting them up, managing them and outputting the data into a Return of Effort may seem like a hassle at first. If I was to explain every bell and whistle I’d have to rewrite the Google Analytics Documents.
There are two kinds of properties: Google Analytics 4 and Universal Analytics. Starting July 1, 2023, standard Universal Analytics properties will stop processing data (July 1, 2024 for Analytics 360).
So, are you ready? Lets go—sign up or login to your Google Analytics | Account.
Do I need GA4 for substack?
Not really, but to each his own; you can track your user(s) activity with google tag—I can’t verify at this moment if our subdomains with Substack minify our code through Cloudflare but it’s a suggested setting, so I assume.
If you end up adding a bunch of insights to track just be aware of trackers being blocked automatically and reducing load times.
Running a website scan with lighthouse would demonstrate that excessive amounts of code is practically frowned upon. Check out the screenshot below:
How to navigate GA4
In Admin, click Create (in my case, this is my parent company, if you only operate it for substack use your title), then select Account.
Provide an account name. Configure the data-sharing to control which data you share with Google.
Click Next to add the first property (in my case this is where I’d put XYBER) to name the account.
Choose your industry, which is probably “Books & Literature”.
Business size (1 to 10 employees).
Choose you business objective.
Generate leads
Drive online sales
Raise brand awareness
Examine user behavior
Get baseline reports
For this example and actually for many of my domains I just choose baseline reports. It does the job for what I need to check on activity here and there, if you use a customer domain for you Substack or use this for another website your CDN also monitors activity, so does Substack in the Stat section as you probably know.
Select you data stream, in this case most users will select Web.
When entering your web stream information make sure you select https.
Note: Most browsers and CDN’s recommend auto redirects to https.
Create your stream and grab your measurement ID and scroll over to Substack.
Note: you don’t have to guard it, it’s public so don’t feel like it’s a confidential piece, you can view anyones is a few different ways.
When you are logged into Substack navigate to the settings tab.
Use the drop down or navigate to the Analytics section.
Recommend | Xybercraft ™
After that you are pretty much done but there are still a few tweaks until you get into some deeper analytic configurations.
Click the gear icon in the bottom left
Click on setup assistance
There are checklist buttons, click on the collect website and app data button to the left of it and it should say data flowing if not come back to that step or follow the coded instruction to place the code in the head section of your website.
The next are mandatory whenever you are ready to continue your configuration:
Walk through the Customize data collection and display (if applicable) and enable them corresponding your Granular location, SDK, or Firebase setup.
For Google signal, Setup conversions and Define audience they are a bit more for the advance setup and everyone may want to generate certain options to categorize users or and audience so I’ll leave that up to you, plus Google documents is there for a reason full of content to read through, just look up the keywords in the search box on the analytics page.
If you a writer—reach out to collaborate on this publication i’d be glad to work with you.
Side Note: Same with the other settings, such as data retention, collection, and all the other options. I mentioned that I don’t monitor that much and might even do away with G4A in general it’s just extra code to load and Substack does a decent job of statistical reports as it is with Datadog and Cloudflare Browser Insights.
How to navigate Google Search Console
Migrate over to Google Search | Console
Click on the menu icon next to the search bar click add property.
When the menu pops up you will have two options as tabs, domain or url prefix.
If you have a custom domain i.e., mywebsite.com choose domain, if you have a subdomain i.e., xyber.substack.com enter it as a url prefix.
How to verify my Substack on Google
After you add you property you will have a selection like so
HTML Tag
Google Analytics
Google Tag Manager
Domain Name Provider
Continue that step with your necessary selection, which is probably GTM.
Why can’t I verify my Substack with GA on Search Console?
Substack reached back out to me and confirmed you cannot confirm your site with GA4 at this time they do not allow you to verify your subdomain with Google Analytics—they said it may change in the future, but the sole purpose to this reason is to counter malicious actors, spamming and other abuse.
So you need to select Google Tag Manager if you set it up correctly, which you should have to verify you owenrship.
If you have a custom domain please enter the .js and/or html snippets in the body and head of your website, as well as verifying your record(s) on your CDN platform.
Miscellaneous: You can browse your site to look for the code if you want by viewing the source directly in your browser or Google | Rich Results Test to examine your code.
Try to find your GTM scripts:
<script async="true" src="https://www.googletagmanager.com/gtag/js?id=G-KFMDZGM8EN&l=GA4DataLayer"></script>
Also try to locate the following after the </head>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KNNKRLPN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
How to get Google to index your Substack
Click on the magnifying glass or URL inspection and enter you site name again, trust me on this.
You won’t see this above, but here’s the thing, keep requesting to be indexed throughout the day or night depending on where you are in the world, and you will eventually squeeze in; unless they have changed there allowance again, but I squeezed in around 9pm central time, you get a limited quota a day.
Note: This will only index your Substack page alone, not individual post, you will have to submit them individually like so:
xyber.substack.com/about
xyber.substack.com/archive
xyber.substack.com/p/your-articles
xyber.substack.com/podcast
While it’s not the best at least you will be able to advertise it and it actually list as a result. You substack site will basically lists everything similar to a landing page. So if your headings are accurate you should still propagate.
Subscribe | Xybercraft ™
Substack Robot.txt
Are locked down, down, down—pull your robot.txt to confirm your results, doesn’t hurt anything, it’s all public and relevant practice if you do they will appear like this:
User-agent: BLEXBot
Disallow: /
User-agent: Twitterbot
Disallow:
User-agent: *
Disallow: /action/
Disallow: /publish
Disallow: /sign-in
Disallow: /channel-frame
Disallow: /visited-surface-frame
Disallow: /feed/private
Disallow: /feed/podcast/*/private/*.rss
Disallow: /subscribe
Disallow: /lovestack/*
Disallow: /p/*/comment/*
Disallow: /inbox/post/*
Disallow: /notes/post/*
Disallow: /embed
User-agent: facebookexternalhit
Allow: /
Allow: /subscribe
*THIS IS WHERE YOUR SITEMAP(S) WILL BE
*THIS IS WHERE YOUR SITEMAP(S) WILL BE
If you don’t see your stamps where I have the bolder text in the code block then you don’t have any, you need certain metrics and getting more follower and subscribes will help.
Adding a your Substack Sitemaps to Google
You can’t at first—I couldn’t get much information out of the Substack staff but I’m sure it’s gotta be a certain amount of organic views, subscribers or other key points, they mentioned that when the time comes for a user you will know or be advised.
Error 404 issues
Is what will be returned if you ran a few scans or submitted your domain like these:
xyber.substack.com/sitemap
xyber.substack.com/sitemap.xml
xyber.substack.com/sitemap_index.xml
xyber.substack.com/sitemap-index.xml
xyber.substack.com/sitemap/sitemap.xml
xyber.substack.com/sitemap_index.xml.gz
xyber.substack.com/sitemap/index.xml
xyber.substack.com/post-sitemap.xml
xyber.substack.com/sitemapindex.xml
xyber.substack.com/sitemap.xml.gz
xyber.substack.com/sitemap.php
xyber.substack.com/sitemap.txt
xyber.substack.com/atom.xml
xyber.substack.com/rss.xml
xyber.substack.com/rss/
What you can do is add a RSS for now.
Indexing your Substack RSS
Simple, swap your publication name with the example below and submit it with the steps in the indexing section above.
https://xyber.substack.com/feed
Trust me, if I would have known this before starting to transfer over to Substack I probably would have waited. But I enjoy Substack so whatever I’ll take the suppression for now.
Additional indexable (if applicable) URLs to add to Google Webmasters
/robots.txt: This file tells search engines which pages to crawl or not to crawl.
/search.xml: A search-specific sitemap for search engines.
/video_sitemap.xml: For indexing video content specifically.
/image_sitemap.xml: For indexing images on your site.
/category-sitemap.xml: If your site has categories, this can help index them.
/author-sitemap.xml: For sites with multiple authors, to index their posts.
Custom sitemaps: Any additional sitemap files you create for specific content types, and certain substack accounts will receive a “news_sitemap.xml”, again you will know when you get to that point, for now get to work.
Summary
A lot of extra triggers and code is bad SEO, after you figure out your sweet spot, run a Pagespeed scan to check website vitals.
I hope I helped you out navigating through these services, they update the UI/UX here and there so in the future I may have to update the images and steps. If it’s daunting it’s just because it’s new, play around with it, you’ll become familiar with it within a week/month.
@Google, #Analytics, #GA4, GTM, @Substack,
Recommend | Xybercraft ™