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:
- Traffic source attribution to see where your visitors come from
- Funnel analysis to watch how they convert
- Affiliate auto-attribution to track those referrals
- Traffic sources in both Customer and Insights views
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
- Head over to Google Cloud Console
- Either create an account or sign in
Create your project
- Look for Select a project at the top
- Click New Project
- Give it a memorable name (like “MyApp-Analytics”):

Connect GA4 to BigQuery
- Use the search bar - just type BigQuery:

- Click through to set it up
- You’ll likely see a Sandbox icon - this means some features are limited:

- To remove the Sandbox mode:
- Click Start Free to begin the free trial:

- 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:


Step 3: Connect GA4 to BigQuery
- Back in GA4, find your way to Admin
- Search for BigQuery links:

-
Pick your new project:
-
Enable both Daily and Streaming exports:

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:
-
Find the IAM settings
- Head to Google Cloud Console IAM Manager
- Make sure you’re in the right project (check the dropdown if you’re not sure)
-
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:
- Grab your Project ID
- It’s right there in your Google Cloud dashboard:

- Usually at the top of the page
- Hook it up to Mantle
- In Mantle, go to Settings → Integrations:

- Find the Google BigQuery section
- Click Connect
- Put in your Project ID:

- Pick your GA dataset from the dropdown:

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:
- Go to Cloud Organization Policies
- Find constraints/iam.allowedPolicyMemberDomains (second page)
- Click Manage Policy
- Create a new Rule Allow All