Connect BigQuery with Service Account

Goran Culibrk

Goran Culibrk

Last updated on Nov 28, 2026

This guide shows you how to connect BigQuery to Ranksy with the Ranksy service account. Ranksy connects to BigQuery only in this way. You do not sign in with Google. You give the Ranksy service account access in your Google Cloud project. For an overview, refer to Connect BigQuery.

What You'll Get

Once connected, Ranksy imports your GA4 data and shows:

  • Traffic Sources: Where visitors come from
  • Pageviews: How many people view your app listing
  • Sessions: Complete user journeys
  • Geographic Data: User locations
  • Device Data: Mobile vs desktop traffic
  • Click Events: User interactions
  • Conversion Tracking: From view to install
  • Attribution: Which channels drive customers

BigQuery is required for the Traffic Sources, Attribution and Campaigns tabs, and for the Keywords and Categories tabs in ASO. To see all the features that need it, refer to Which Features Need Which Connection.

Prerequisites

Before you start, make sure you have:

  • Google Analytics 4 (GA4) tracking your Shopify app
  • GA4 linked to BigQuery with data export enabled
  • At least 24 hours of exported data in BigQuery
  • Access to Google Cloud Console for your project

Don't have BigQuery export set up yet? See the Set Up GA4 BigQuery Export guide first.

Step 1: Grant Access to Ranksy Service Account in Google Cloud IAM

In this step, you'll add the Ranksy service account to your Google Cloud project and give it permission to read your BigQuery data.

1.1 Open Google Cloud Console

  1. Go to the Google Cloud Console
  2. Make sure you're signed into the Google account that owns the BigQuery project
  3. Select your project from the dropdown at the top of the page

1.2 Navigate to IAM & Admin

  1. Click the hamburger menu (☰) in the top left
  2. Scroll down and click IAM & Admin
  3. Click IAM in the submenu

1.3 Add the Ranksy Service Account

  1. Click the + GRANT ACCESS button at the top

  2. In the "New principals" field, enter the Ranksy service account email:

    ranksy-service-account@ranksy-466612.iam.gserviceaccount.com
    
  3. Click in the "Select a role" dropdown

1.4 Assign Required Roles

You need to add two roles to the service account:

First Role - BigQuery Data Viewer:

  1. In the role dropdown, type "BigQuery Data Viewer"
  2. Select BigQuery Data Viewer from the list

Second Role - BigQuery Job User:

  1. Click + ADD ANOTHER ROLE
  2. Type "BigQuery Job User"
  3. Select BigQuery Job User from the list

1.5 Save the Configuration

  1. Review your settings:
    • Principal: ranksy-service-account@ranksy-466612.iam.gserviceaccount.com
    • Roles: BigQuery Data Viewer, BigQuery Job User
  2. Click SAVE

You should see the Ranksy service account appear in your IAM members list.

Why These Roles?

Role Purpose
BigQuery Data Viewer Allows reading data from your BigQuery tables
BigQuery Job User Allows running queries against your data

These are read-only permissions. Ranksy cannot modify, delete, or write to your BigQuery data.

Step 2: Connect BigQuery in Ranksy

Now that you've granted access, enter your project details in Ranksy to complete the connection.

2.1 Navigate to App Settings

  1. Log in to Ranksy.
  2. Click your name at the bottom of the sidebar.
  3. Click Manage Apps.
  4. Click your app. Its App Settings page opens.

2.2 Open the BigQuery Tab

Click the BigQuery tab. The Google BigQuery card opens.

2.3 Enter Your Project Details

Google Cloud Project ID:

  1. This is your Google Cloud project identifier
  2. Find it in Google Cloud Console at the top of the page (e.g., my-company-analytics)
  3. Enter it in the "Google Cloud Project ID" field

BigQuery Dataset ID:

  1. This is where GA4 exports your data
  2. The format is analytics_XXXXXXXXX where X's are your GA4 property ID
  3. Enter it in the "BigQuery Dataset ID" field

Example configuration:

  • Project ID: my-company-analytics
  • Dataset ID: analytics_123456789

2.4 Save and Import

  1. Make sure that the text Will connect to: shows the correct project and dataset.
  2. Click Save Configuration & Import Data.
  3. The message "BigQuery settings saved successfully!" shows. Ranksy starts the first import.

Note: Ranksy does not test the connection before it saves. If the service account cannot read the dataset, the status changes to Auth Error or Error. Refer to the Troubleshooting section below.

Finding Your Dataset ID

If you're not sure what your dataset ID is:

  1. Go to the Google Cloud Console
  2. Navigate to BigQuery (in the sidebar or search for it)
  3. In the left panel, expand your project
  4. Look for a dataset named analytics_XXXXXXXXX
  5. The dataset name is your Dataset ID

What Happens After Connection

Initial Import

After you save your configuration:

  • Ranksy imports all GA4 export tables that are in your dataset.
  • The time of the import depends on the quantity of data.
  • You can close the page. The import continues in the background.

Automatic Updates

After the first import, Ranksy imports new data automatically:

  • Approximately every 4 minutes, Ranksy reads the data of the current day.
  • One time each hour, Ranksy reads the data of the last 7 days again.

You do not have to do anything. There is no manual import button.

Re-import Data

If your data looks incorrect, you can import it again:

  1. Open the BigQuery tab.
  2. Click Re-import Data.
  3. Click Yes, Re-import Data.

⚠️ Warning: A re-import deletes all BigQuery analytics data of this app first. Then Ranksy imports all data again from your dataset.

Disconnect

  1. Open the BigQuery tab.
  2. Click Disconnect BigQuery.
  3. Click Yes, Disconnect.

⚠️ Warning: When you disconnect, Ranksy deletes all BigQuery events, sessions, and traffic data of this app. The data in your BigQuery dataset does not change.

View Your Data

After import completes, explore your data:

  • Traffic Analytics: See where your visitors come from in the Traffic Hub
  • Attribution: Understand which channels drive installs
  • Analytics Dashboard: Get a complete overview in Your Dashboard

Troubleshooting

Status Shows "Access Denied"

The BigQuery tab shows Access Denied, and the status badge shows Auth Error. The service account cannot read your dataset.

Fix:

  1. Go back to Google Cloud Console → IAM & Admin → IAM.
  2. Make sure that the Ranksy service account is in the list.
  3. Make sure that it has the BigQuery Data Viewer role and the BigQuery Job User role.
  4. If a role is missing, click the pencil icon and add the role.
  5. In Ranksy, open the BigQuery tab.
  6. Click Save Configuration & Import Data again. Syncing starts again.

Dataset ID Error

The message says that the Dataset ID is missing or is not a valid dataset name.

Fix:

  1. Go to BigQuery in Google Cloud Console.
  2. Make sure that the dataset analytics_XXXXXXXXX exists.
  3. Copy the exact dataset name and paste it in Ranksy.
  4. Make sure that there are no typing errors or extra spaces.
  5. Click Save Configuration & Import Data.

Project ID Error

The project ID is incorrect.

Fix:

  1. Go to Google Cloud Console.
  2. Look at the project selector at the top. Copy the project ID, not the project name.
  3. Enter the exact project ID in Ranksy.
  4. Click Save Configuration & Import Data.

Import Takes Too Long

A large dataset can take some hours to import. Look at the status and the time of the last sync on the BigQuery tab. If the first import does not complete in 6 hours, contact support.

No Data Shows After Import

Check these:

  1. Make sure that GA4 tracks your app. Look in Google Analytics.
  2. Make sure that the BigQuery export has data. Look at the tables in the BigQuery console.
  3. Make sure that the date range on the Ranksy page includes days with data.

Security & Privacy

What Ranksy Accesses

Ranksy only reads your GA4 event data from BigQuery. Ranksy cannot:

  • Modify your data
  • Delete tables or datasets
  • Access other Google services
  • See data from other projects

Data Handling

  • All data is encrypted in transit (TLS/SSL)
  • Stored encrypted at rest (AES-256)
  • Isolated per account
  • GDPR compliant

FAQ

Can I sign in with Google instead of the service account?

No. Ranksy connects to BigQuery only with the service account. There are no sign-in pop-ups and no tokens that expire.

Can multiple team members use this?

Yes. After you connect, all team members with access to the Traffic pages can see the data.

What if I remove the service account later?

Ranksy cannot import new data. The status changes to Auth Error. The data that Ranksy already imported stays until you disconnect.

Does this cost money?

BigQuery has a free tier (1 TB queries/month, 10 GB storage). Most apps stay within free limits.

Can I import data from before I connected?

Yes. The first import reads all export tables that are in your dataset. GA4 does not export data from before you turned on the export.

Next steps

  • Traffic Hub — See where your visitors come from, attribution, campaigns, and GA4 data.
  • Your Dashboard — See your funnel in the Traffic widget.
  • Connect Partner API — Add revenue data for the complete picture.
  • support@ranksyapp.com — Get help by e-mail or in the chat widget. Include your app name and any error messages that you see.