gtm-tools
needs credentials of a Google Cloud Service
Account with access
to Tag Manager
APIs to work.
Follow the instructions to setup a Service Account with proper accesses.
Create a Service Account
Credentials are created under a project. If you don't have an existing project that you can use, create a new project.
- Give your Service Account a name:
- Continue the optional 2nd and 3rd steps to create the service account.
- You will see your new service account in the dashboard.
- Generate a new Key for your service account. Select
JSON
format for the key: - Your new key will be downloaded as a JSON file. Store it carefully.
Once you have your Service Account ready, you will need to enable Tag Manager API for your project.
- Head over to
APIs and services
section in Google Cloud Console. - Click on
ENABLE APIS AND SERVICES
. - Search for
Tag Manager
to find the option for Tag Manager API. Then click it and enable it for this project.
You have created a Google Cloud project with access to Tag Manager API, you have created a Service Account under that project and you have downloaded the credentials for this Service Account.
Service Accounts are sort of like regular users. They are meant only to be used for programmatic API access to services instead of using them to login a web application like a regular user. So just like regular users need to be given access to work with a Google Tag Manager account, Service Accounts also need to be given access to them for API access.
- Login to Google Tag Manager web console and head over to accounts list.
- Open Admin Settings for one of your accounts.
- Go to User Management.
- Click on the
+
button to add a new user. - Copy the email address for your Service Account from the list of service accounts on Google Cloud console.
- Under Email addresses, add the email address for your service account.
Then select the right permissions. If you want to use all the features of
gtm-tools
, you need to give this user all the permissions. Then invite this user.
This is it! Your account and service account credentials are now configured to
be used with gtm-tools.