Install the tracking snippet with Google Tag Manager
Overview
Google Tag Manager (GTM) lets you add the Reo.dev tracking script to your site without editing its source code. If your team already manages tags through GTM, this is usually the easiest way to install Reo.dev, and you don't need to be a developer to do it.
What you need to know about GTM before proceeding
GTM works through its own small piece of code, called the container snippet, that gets pasted into the site's pages once.
One block in the
<head>, and another right after the opening<body>tag.That one-time step needs a developer, since it means editing the site's code directly.
Once that snippet is live, every tag after that, including Reo's, gets added, changed, or removed entirely through GTM's web interface. No more code edits, no more developer needed.
That's the part anyone with GTM access can do, and it's what the rest of this page covers.
Before you start
Configure your Base URL in Reo.dev first. If you skip this, the Reo.dev tag you create in GTM will still fire correctly, but Reo.dev won't have anywhere to attribute that traffic to, so you'll see no data.
You need access to your site's Google Tag Manager account.
You need your Reo.dev Client ID.
Configure your Base URL in Reo.dev
For Website Tracking via GTM
Go to Settings → Integrations → Website → Configure, and add your website's base URL. For the full walkthrough, including what a Base URL is, see the Website integration guide.
For Documentation Tracking via GTM
Go to Settings → Integrations → Documentation → Configure, and add your documentation site's base URL. You can add more than one subdomain if needed. For the full walkthrough, see the Documentation integration guide.
Once your Base URL is set, follow the steps below. The GTM steps are the same whether you're tracking your Website or your Documentation.
Glossary
A quick glossary before you start:
a tag is the piece of tracking code GTM manages for you
a trigger is the rule for when that tag runs
Custom HTML is the tag type you use to paste in a script like Reo's
Add the tag in Google Tag Manager
Log in to Google Tag Manager at tagmanager.google.com. From the top-left corner (next to the Google Tag Manager logo), select the account linked to your documentation or website.

From the left menu, choose Tags. If you have existing tags, they will appear here.

Click New > select 'Choose a tag type to begin setup...'


Under Tag Configuration, choose Custom HTML as the tag type.

Paste the script below into the HTML box, replacing
XXXXXXXXwith your Client ID.

Once that's done, you have to choose a trigger for the script to load. Under Triggering, choose Initialization - All Pages. This makes the tag run as soon as any page loads.

Click Save.

Upon saving, you will land on the Tags page. Click Submit to proceed.

Then Publish, to make the tag live (this is important):
Submit stages your changes as a new version.
Publish is the step that actually deploys them to your site.
While publishing, you can choose to fill other details pertaining to the container version.


Once you're finished, a screen like this confirms your changes are published. You can now move on to verify the snippet is installed on your documentation site or website.

Verify the snippet is installed
The fastest way: on the Website or Documentation configuration page in Reo.dev (Settings → Integrations), click Check status in the top-right corner. It tells you whether Reo.dev is receiving data.
To check manually instead:
Open your documentation page
Right-click anywhere on the page and select Inspect to open developer tools
In the Network tab, search for
reoand check if the network calls are being registered (status code: 200)
CSP requirements
If your site enforces a Content Security Policy (CSP), allow these domains. This is usually set in your site's HTTP response headers or a CSP meta tag, ask whoever manages your hosting if you're not sure where.
script-src <https://static.reo.dev>connect-src <https://api.reo.dev>
For cookies and data handling, see the cookie management guide.
Same safeguards as a direct install
This is the same Reo.dev tracking script used in every install method, just deployed through GTM instead of pasted directly.
The same protections apply:
HTTPS encryption
anonymous data collection only
asynchronous loading so it doesn't slow your page down
fail-safes so an error in the script never breaks your site
FAQs
Does publishing this tag also publish other tags in my container? Yes, GTM's Submit and Publish pushes every pending change in the container live, not just the Reo tag. If a teammate has other untested changes sitting in the same container, publishing your tag ships theirs too. Check with your team before you publish if you're not the only one working in that container.
Can I test the tag before it goes live? Yes, use GTM's Preview mode to confirm the tag fires correctly on your site before you publish, so you're not troubleshooting on a live page.
Do I have to paste my Client ID directly into the script, or can I use a GTM variable? You can use a GTM variable instead of hardcoding it. This is useful if you manage multiple environments, like staging and production, with different Client IDs.
Last updated
Was this helpful?

