Connect Google Tag Manager to Rig

    Sync the full configuration of your Google Tag Manager accounts into Rig, from containers and workspaces to tags, triggers, variables and version history, so your AI tools can answer what fires on your site and what changed. It connects with a Google service account that you add to Tag Manager.

    Before you start

    • You need a Google Cloud project, and Administrator access to the Tag Manager account so you can add a user.
    • The service account only needs read access.

    Step 1: Create a service account key

    1. In the Google Cloud console, open a new or existing project and enable the Tag Manager API.
    2. Go to IAM, then Service Accounts, and create a service account.
    3. Open the account's Keys tab and create a new key of type JSON. Keep the file.

    Step 2: Add the service account to Tag Manager

    1. In Tag Manager, select Admin and, in the Account column, select User Management.
    2. Click the add button, then Add users.
    3. Enter the service account email, which is in the JSON file as client_email.
    4. Set Account Permissions to User, and under Container permissions give Read on the containers you want to sync. Read lets the account browse tags, triggers and variables without changing them.
    5. Click Invite.

    Step 3: Connect it in Rig

    Adding a source needs a workspace owner, or a role with the Manage connections permission, on a workspace where you manage your own connections. If the Connectors tab says “Data ingestion for this workspace is managed by Rig”, ask an owner or Rig support to add the source.

    1. In Rig, open Connections, choose the Connectors tab and go to Sources & actions.
    2. Search for Google Tag Manager, open the card and click Connect.
    3. Choose the service account option, then paste the full contents of the JSON file into Service account JSON key.
    4. To restrict the sync, enter numeric account IDs in GTM Account IDs (optional, comma-separated). You find an ID under Admin, then Account settings. Leave it blank to sync every account shared with the service account.
    5. Choose the streams you want and click Connect. The source then syncs nightly unless you change it, and you should keep it nightly.

    What Rig pulls in

    Google Tag Manager lands in its own google_tag_manager schema in your warehouse:

    • Accounts, containers and workspaces: the structure of your Tag Manager setup.
    • Tags, triggers and variables: tags, triggers, variables, built-in variables and folders in each workspace.
    • Templates and zones: custom templates and zones.
    • Server-side setup: server-side clients and transformations, and Google tag configs.
    • Versions and environments: container version headers, environments and Google tag destinations.

    Each sync replaces the tables, so a tag or trigger you delete in Tag Manager also drops out of the warehouse.

    Good to know

    • Tag Manager's API allows 10,000 requests a day per project and about 0.25 requests a second. Going over returns a 403 error, which Rig retries with a back-off.
    • A small setup of three containers needs about 44 requests, so about 4 minutes. An agency account with around 50 containers needs about 700 requests and runs slowly.
    • This data describes configuration. It is a mirror of what is set up, and it carries no events or traffic.
    • To disconnect Google Tag Manager, click the bin icon on the source's row under Sources & actions. Only whoever connected the source or a workspace owner can do this, and data already synced stays in the warehouse.

    What people use this for

    • Audit what is actually firing on your site
    • Track who changed what, and when
    • Check tracking consistency across sites

    More ideas for using Google Tag Manager

    Google Tag Manager documentation

    Was this guide helpful?