Contact salesTry for free

How to connect Google Service Account to Stape

Ira Holubovska

Ira Holubovska

Author
Updated
Apr 20, 2026
Also available in

With the help of a Google Service Account connected to Stape, you integrate server Google Tag Manager with BigQuery and Firestore. This blog post will show how to create a Google Service Account and connect it to your Stape container.

What is Google Service Account, and what possibilities does it bring to sGTM?

Google Service Accounts can be used by applications to make authorized API calls. With the help of a Google Service Account connected to the sGTM container, it is possible to integrate BigQuery and Firestore with server GTM. 

To create a Google Service account, you will need to have a Google Cloud Platform account and generate an Access Key. The service account JSON key file must be added to an sGTM container power-up in Stape to authenticate with these services.

Firestore is a database that can write/read or sync data. It can be used to enrich data sent using server-side tags. For example, with the help of user ID, you can extract additional user data from Firestore and send more user parameters to Facebook CAPI, which will increase the FB event match quality score.

To simplify integration, Google released the Firestore Lookup variable. With the help of this variable, you can extract specific values from the Firestore document. The only disadvantage is that Firestore is not a free service - check the price here.

Using server Google Tag Manager, it’s possible to write data directly to BigQuery from sGTM Tag or Client. Previously BigQuery integration was only available for 360 users. With the release of sGTM and GA4, all users can send data to BigQuery for free or cheaper than before. BigQuery is also not free - check its pricing here.

How to connect Google Service Account to Stape?

Step 1 | Activate the power-up

1. Log in to your Stape account and select your sGTM container from the dashboard.

select your sGTM container from the dashboard

2. Go to Power-ups and click Use next to the Google Service Account panel.

 Google Service Account panel

3. Toggle the Google Service Account switch to enable it.

Toggle the Google Service Account switch

Step 2 | Obtain the service account credentials file

1. Open the Google Cloud Console and go to IAM & AdminService Accounts. Click Create service account.

Click Create service account

2. Enter a name, and click Create and continue.

Enter a name, and click Create and continue

3. Assign the appropriate role:

  • BigQuery Data Editor for BigQuery access
  • Cloud Datastore User for Firestore access
  • Both roles if you need access to both services

4. Click Continue and Done.

Click Continue and Done

5. Click the newly created account, open the Keys tab, then click Add keyCreate new key.

Create new key

6. In the pop-up, select JSON and click Create. A JSON file will download to your computer.

In the pop-up, select JSON and click Create

7. Back in Stape, click Select file and upload the JSON file you downloaded.

8. Click Save changes.

Click Save changes

Step 3 | Set up Google Cloud Services

Testing

Verify the connection is working by triggering a test event through your sGTM container and checking that data lands in the expected destination:

  • BigQuery: Navigate to your dataset in the BigQuery console and confirm a new row appears after the test event fires. See Explore BigQuery in the Google Cloud console for instructions on browsing table data.
  • Firestore: Open your Firestore database in the Cloud Console and check that the relevant document was created or updated. See Use Firestore Studio for instructions on viewing and filtering documents.

Need help with setting up server-side tagging?

All it takes is a few simple questions. Click Get A Quote, fill-up the form, and we will send you a quote.

Get a Quote
author

Ira Holubovska

Author

Ira has 10+ years of digital marketing experience, with the last 5 focused on server-side tracking. She understands how and when it works across various digital marketing scenarios.

Comments

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.