Docs Connect an integration Google Analytics 4 and BigQuery for Shopify

Setting up Google Analytics 4 for Shopify apps with BigQuery integration

This guide provides steps for integrating Google Analytics 4 with your Shopify app, focusing on efficient transition and BigQuery linkage.

Transitioning to Google Analytics 4 from Universal Analytics

Step 1:

Existing Universal Analytics users should use the Setup Assistant for easy migration to Google Analytics 4. New users will need to establish a new property from scratch. To locate the Setup Assistant, use the search function for quick access.

Step 2:

Post-migration, access your Google Analytics 4 property and navigate to Data Collection and modification -> Data streams. Choose the pre-created stream from the migration or create a new one.

Step 3:

Ensure the stream URL matches your listing URL. Copy the measurement ID and set up the Measurement Protocol API by generating a new API secret.

Step 4:

In your Shopify App listing, input the Tracking ID and API secret. Save and verify the setup.

Step 5:

Return to Google Analytics, go to Reports -> Realtime, and observe the Event Count by event name as you initiate an app install.

Step 6:

Optionally, mark the ‘Add App’ button event as a conversion in Google Analytics 4 settings.

BigQuery integration with Google Analytics 4

Step 1:

Create a Google Cloud platform account at no cost.

Step 2:

Create a new project in your account and verify BigQuery activation.

Step 3:

To locate BigQuery within Google Cloud, simply use the search term “BigQuery”:

The Sandbox icon will be displayed and certain features may not function properly until an account with billing setup is established.

To remove the Sandbox label, you must link a billing account with a valid credit card. You will not incur any charges, and the account will be compatible with GA4.

Add a billing account to activate full BigQuery features with Google Analytics 4.

Click Start Free to start a free trial:

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

After billing is setup, link BigQuery to your Google Analytics 4 project:

selecting Daily and streaming options for up-to-date data access:

Integrating BigQuery

After following the instructions on how to set up Google Analytics GA4 with the BigQuery link they’ll need to grant access to mantle to access the Bigquery data within this GA project.

  1. Ensure GA4-BigQuery Setup: Confirm that Google Analytics GA4 is properly set up and linked with BigQuery.

  2. Access IAM Manager: Go to the Google Cloud Console IAM Manager and select your GA project.

  3. Granting Access to Mantle:

    • Navigate to the ‘Add’ section to grant access to a new principal.
    • Use the email [email protected] for Mantle’s service account.
    • Assign the roles of “BigQuery Data Viewer” and “BigQuery Job User” to enable viewing and processing of BigQuery data.

For detailed role assignment instructions, refer to Granting an IAM Role in the Console.

Authenticating Mantle

With the preliminary setup complete, you are now ready to authenticate Mantle with your BigQuery project. This process is quick and straightforward:

  1. Locate your Project ID within BigQuery via your Google Cloud dashboard:
  1. Then in your Mantle dashboard, go to the Settings menu.

  2. Select the Integrations option.

  3. Connect to BigQuery:

    • Locate the Google BigQuery integration section.
    • Click on Connect to initiate the authentication process:
  1. Enter Project ID:
    • In the prompt that appears, input the Project ID of your BigQuery project. Mantle will then authenticate with BigQuery.
BigQuery integration modal BigQuery integration modal with content

After linking Google Analytics to BigQuery, data transfer begins within 24 hours. However, this integration only includes new data post-linkage and does not import historical Google Analytics data.

By following these steps, Mantle will be successfully authenticated with BigQuery, enabling seamless data integration and management.