Docs Data Google Analytics 4 and BigQuery for Shopify

Setting up Google Analytics 4 with BigQuery

Want to understand what happens before someone installs your app? Connecting Google Analytics 4 and BigQuery to Mantle lets you track the discovery and installation process - from how merchants find your app listing through to installation and subscription.

Once connected, you’ll get access to:

You’ll see which traffic sources bring your best customers, what search terms drive quality installations, and how different segments convert from discovery to install and subscription.

Here’s how to get everything set up, broken down into simple steps.

Step 1: Set up GA4 tracking

Already have GA4 set up for your app? Feel free to skip to Step 2.

If you’re starting fresh, you’ll need to set up Google Analytics 4 tracking for your app listing. Follow Shopify’s official guide. Once done, do a test install and check GA4’s Realtime reports to make sure everything’s working.

💡 Pro tip: Consider marking the ‘Add App’ event as a conversion in GA4 to enable better reporting of your key metrics.

Step 2: Set up BigQuery

Now let’s set up BigQuery. If you’re already using BigQuery with GA4, jump to Step 3!

Get your Google Cloud account sorted

  1. Head over to Google Cloud Console
  2. Either create an account or sign in

Create your project

  1. Look for Select a project at the top
  2. Click New Project
  3. Give it a memorable name (like “MyApp-Analytics”):
New BigQuery Project

Connect GA4 to BigQuery

  1. Use the search bar - just type BigQuery:
Search for BigQuery
  1. Click through to set it up
  2. You’ll likely see a Sandbox icon - this means some features are limited:
BigQuery sandbox
  1. To remove the Sandbox mode:
    • Click Start Free to begin the free trial:
Free trial button
  • Add a billing account with a valid credit card
  • Once billing is set up, you’ll have full access to BigQuery features

Important: To avoid any interruptions in service from your BigQuery account, make sure to activate the account as well:

Activate BigQuery billing button Activate BigQuery billing modal

Step 3: Connect GA4 to BigQuery

  1. Back in GA4, find your way to Admin
  2. Search for BigQuery links:
BigQuery Links
  1. Pick your new project:

  2. Enable both Daily and Streaming exports:

BigQuery link streaming settings

You’ll know you’re set when you see that active BigQuery link in your GA4 settings.

Step 4: Grant Mantle access

Now that BigQuery’s all set up, let’s make sure Mantle can see your data:

  1. Find the IAM settings

  2. Let’s add Mantle to the mix

    • Click the Grant access button
    • Here’s Mantle’s service account: [email protected]
    • Mantle needs two roles:
      • BigQuery Data Viewer (so we can see your data)
      • BigQuery Job User (so we can process it)

Step 5: Connect everything in Mantle

Almost there! Let’s tie it all together:

  1. Grab your Project ID
    • It’s right there in your Google Cloud dashboard:
BigQuery project id
  • Usually at the top of the page
  1. Hook it up to Mantle
Connect BigQuery in Mantle
  • Find the Google BigQuery section
  • Click Connect
  • Put in your Project ID:
BigQuery integration modal
  • Pick your GA dataset from the dropdown:
BigQuery integration modal with content

Running multiple apps?

Got more than one app? No problem:

  • Set up separate GA4 properties for each app (keeps things clean)
  • Connect them all to the same BigQuery project (or use multiple projects if you prefer)
  • Each app’s data stays separate while being managed from one place

What happens next?

Here’s what to expect after setup:

  • BigQuery will start pulling in new GA4 data within 24 hours
  • Note that BigQuery only syncs data from the time you link it from GA4 and does not backfill historical data

FAQ

I've connected everything via this guide, why are my events not showing up?

First, check if you've correctly set up GA4 in your app listing. Then verify:

1. Your events are appearing in BigQuery (Mantle reads directly from here)
2. You've added your app store slug in your app's settings in Mantle

Can you backfill historical data?

No, BigQuery only syncs data from the moment you connect it to GA4. Historical data cannot be backfilled.

How long does syncing take?

It can take up to 24 hours for your dataset to appear in Mantle's Google BigQuery modal (but usually much quicker). Once synced, you'll be able to select your dataset for your app.

Why isn't my dataset showing up?

If you've connected everything correctly but don't see your dataset, check if you've selected the corresponding GA dataset in your Mantle BigQuery settings.

Why am I missing install data?

Missing install data usually means the measurement ID wasn't properly set up on your Shopify App Store listing when following Shopify's GA4 guide.

Why did my GA4 data stop syncing to Mantle?

If your data suddenly stops syncing, check your BigQuery account status. Google stops streaming data if your account isn't active or if billing isn't properly set up. See Step 2: Set up BigQuery for details.

I'm getting a policy error when trying to add roles in Google Cloud IAM, how do I fix it?

While we can't provide official Google Cloud permissions advice, here's a solution that has worked for others:

  1. Go to Cloud Organization Policies
  2. Find constraints/iam.allowedPolicyMemberDomains (second page)
  3. Click Manage Policy
  4. Create a new Rule Allow All