/Documentation

Google Service Account power-up

Updated Jun 18, 2026

The Google Service Account power-up connects your sGTM container to Google Cloud services such as BigQuery and Firestore, and allows the container to talk to authenticated GCP APIs. A single JSON credentials file is all you need to start reading, writing, and enriching event data directly from your sGTM container.

Google Service Account is available on the Free subscription plan and higher. To check your current plan or upgrade, go to your sGTM container settings.

How to set up Google Service Account

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.

Use case

BigQuery

A sample scenario is an online store that needs to know which products are selling best, but their GA4 data is incomplete because of sampling, making it hard to get clear answers. This means the team is guessing based on general numbers rather than seeing what's really happening.

You can fix this by sending raw data directly to BigQuery:

  1. Set up the Google Service Account power-up using your service account JSON key (make sure the key has the BigQuery Data Editor role). Then, create a Write to BigQuery tag in your sGTM container to send your purchase data to a BigQuery table.
  2. As your data arrives in BigQuery, you can run clear, detailed reports to see your revenue by product, date, or source - without any sampling issues.
  3. Check these results against your GA4 reports. You'll likely see more accurate, detailed data in BigQuery that helps your team finally answer tricky questions about product sales.

Google Merchant Center

If your Google Shopping reports are missing important product details, like brands or categories, you are likely only seeing basic information like item IDs and prices. This makes it difficult to track campaign performance accurately.

You can fix this by automatically adding product information from your Google Merchant Center feed into your tracking setup.

  1. Enable the Merchant API in your GCP project, and set up a Service Account with Admin access to your Merchant Center. Add the Google Merchant Center Lookup variable to your sGTM container, point it to your Merchant Center ID, and map the attributes you need (such as product_type to item_category) into your GA4 and Google Ads tags.
  2. Once active, your tracking system will automatically fill in the missing product details for every event before it is sent to your reports.
  3. After about a week, compare your GA4 and Google Ads reports to your previous data.

Firestore

A sample scenario is an eCommerce store with a loyalty program that rewards customers based on how much they’ve spent (Bronze, Silver, and Gold tiers). You want to bid more for those, but your ad platform doesn’t know who they are because that data is hidden in your private database and doesn't get sent to your website's tracking tools.

You can solve this by using Firestore to save and retrieve that data:

  1. Set up the Google Service Account power-up using your service account JSON key (make sure it has the Cloud Datastore User role). Create a Firestore collection that maps a customer identifier (such as a hashed email or a first-party cookie value) to their loyalty tier. Whenever a customer buys something, use the Firestore Writer tag to save their loyalty status into your database. Use the Firestore Lookup variable in your sGTM to look up that customer's loyalty tier whenever they interact with your site.
  2. Send this tier information to Google Ads as a custom label. Now, you can create specific  audience lists in Google Ads for each loyalty tier (like "Gold members").
  3. Monitor your campaign performance by tier over the following 2-4 weeks.
  4. After a few weeks of testing, you can adjust your bids specifically for your most valuable customers.

Was this article helpful?

Comments

Can’t find what you are looking for?