For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Not sure if that one-time step has already happened on your site? Ask whoever manages your GTM account, or have a developer check the site's page source for a script referencing a container ID that starts with GTM-.


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

  1. 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.

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

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

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

  1. Paste the script below into the HTML box, replacing XXXXXXXX with your Client ID.

  1. 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.

  1. Click Save.

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

  1. Then Publish, to make the tag live (this is important):

    1. Submit stages your changes as a new version.

    2. Publish is the step that actually deploys them to your site.

    3. While publishing, you can choose to fill other details pertaining to the container version.

  1. 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:

  1. Open your documentation page

  2. Right-click anywhere on the page and select Inspect to open developer tools

  3. In the Network tab, search for reo and 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

For questions about the tracking script itself, safety, performance, PII, browser support, and compliance, check out the FAQ on the Website integration guide or Documentation integration guide. Those apply for installation through Google Tag Manager as well.

  • 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?