How can we help?

Google Tag Manager Integration

Netanel Hugi
Netanel Hugi
  • Updated
Torii SMP
Torii Identity

Overview

Torii integrates with Google Tag Manager and syncs:

User Fields License Types
Email, Role (account-level permission) Google Tag Manager
  • You can constantly stay updated with application information from our Integrations Page >> Integration Capabilities button >> Integration Capabilities table.

Requirements

To connect this integration, we require the following:

Accounts & Permissions

  • A Google Cloud project where you can enable the Tag Manager API and create a service account.
  • Administrator permission on the Google Tag Manager account. Administrator permission is required to list users.

Required keys

  • GTM Account ID
  • Service Account Email
  • Service Account Private Key

How to Generate the Required Values

Follow these steps to generate the required values:

Step 1: Enable the Tag Manager API

  1. Sign in to the Google Cloud console.
  2. Select an existing project or create a new one.
  3. Go to APIs & Services >> Library, search for Tag Manager API, and click Enable.

Step 2: Create a service account and a key

  1. Create a service account in the project. See Google's guide: Create service accounts.
  2. Create a JSON key for the service account: in IAM & Admin >> Service Accounts, open the service account, go to the Keys tab, and click Add key >> Create new key. Select JSON and click Create. The key file downloads to your computer. See Google's guide: Create and delete service account keys.
  3. Open the downloaded JSON file and note two values: client_email (this is the Service Account Email) and private_key (this is the Service Account Private Key).

Important
Google lets you download the key file only once. Store it securely.

Step 3: Add the service account to Google Tag Manager

  1. Sign in to Google Tag Manager and open Admin.
  2. In the Account column, click User Management.
  3. Click + and then Add users.
  4. Enter the service account email (the client_email value) and set Account Permission to Administrator.
  5. Click Invite.

For more details, see Google's user management help.

Step 4: Find the GTM Account ID

  1. In Google Tag Manager, go to Admin >> Account Settings and copy the Account ID.
  2. Alternatively, copy the number that appears after /accounts/ in the Google Tag Manager URL.

How to Connect the Integration

  1. Go to the Integrations page in Torii.
  2. Search for Google Tag Manager and click Connect.
  3. Enter the GTM Account ID, Service Account Email, and Service Account Private Key. Paste the private_key value only, without quotation marks.
  4. Click Connect.

Actions

  • Create User - adds a user to the Google Tag Manager account with the User or Administrator account permission. The email must belong to a Google account.
  • Delete User - removes a user's access to the Google Tag Manager account.

Q&A

Q: Can I connect more than one Google Tag Manager account?

A: Yes. Each connection covers one Google Tag Manager account, identified by its Account ID. Connect each account separately.

Q: Which user details does Torii sync?

A: Torii syncs each user's email and account-level role. Google Tag Manager does not provide names or last login times.

Q: What happens if the sync hits Google's usage limits?

A: The Google Tag Manager API allows 10,000 requests per project per day and a limited request rate. If the limit is reached, Torii retries the sync later.



For any further questions, please contact Torii Support.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request