Integrating Google Analytics 4 with Petavue

This guide provides a step-by-step process for integrating your Google Analytics 4 (GA4) data with Petavue. This will be done using the "GA4 Reports Builder for Google Analytics" add-on for Google Sheets to create an automated data pipeline.


This recommended method allows for seamless data synchronization, enabling you to analyze and drill down your GA4 data directly within Petavue.


Step 1: Connect Petavue to Google Sheets


To get started, log into the app.petavue.com. Navigate to Settings—> Integrations. Find Google Sheets and click "Connect".


This will redirect you to Google's login page. Select the Google account you want to use, then approve the connection. Once the approval is complete, the Google Sheet integration with Petavue is all set.


Note: After selecting your account, Google will show you a warning. Don't worry, this is normal! We're currently in the process of getting Petavue fully verified with Google. Just click Continue to finish setting up the integration.


Step 2: Install the 'GA4 Reports Builder' Add-on


Next, you must install the necessary Google Sheets add-on. This tool allows you to create, manage, and run GA4 reports directly from a spreadsheet.


To perform the installation, follow the steps below:


  1. Click the link below to go to the Google Workspace Marketplace.
  2. Click Install and follow the on-screen prompts to grant the necessary permissions to your Google Account.


Step 3: Create Your First GA4 Report


Once the add-on is installed, you can configure your first report.


Follow the steps below to configure your first report:


  1. Open a new or existing Google Sheet.


  2. Navigate to the menu bar and click Extensions → GA4 Reports Builder for Google Analytics™ → Create a new report.


  1. A configuration sidebar will open on the right. Fill in the required details for your report:
    • Report Name: Give your report a descriptive name (e.g., "Monthly User Traffic").


    • Google Analytics 4 Account: Select the GA4 account and property you want to pull data from.


    • Date Range: Choose a start and end date for your report.


    • Dimensions & Metrics: Select the dimensions (e.g., Page path, Country) and metrics (e.g., Active users, Sessions) you need.


    • Filters (Optional): Apply any filters to narrow down your data.



  1. Click the Create Report button at the bottom.


A new tab, titled Report Configuration, will be created in your sheet. This tab holds the settings for the report you just defined.


Step 4: Run the Report to Fetch Data


After configuring the report, you need to run it to pull the data from Google Analytics.


To do so, perform the following actions:


  1. Go to Extensions → GA4 Reports Builder for Google Analytics™ → Run reports.


  2. The add-on will process your request. When it's finished, a new tab will appear in your spreadsheet, named after the report you created in the previous step.


  3. This new tab contains a summary of the report and the complete dataset you requested.


  4. Run this report daily to ensure your data is always fresh and up-to-date.


Step 5: Share Your Google Sheet with Petavue


Once you've created the Google Sheet with your GA reports, you can share it with the Petavue team to sync the data.


Simply send the link of the spreadsheet to the Petavue team. You can do this through Slack or by emailing to support@petavue.com.


Once the Petavue team adds this GA4 data as a source within Petavue, you can access the tables and columns synced under Data Hub—> Dictionary.


Note: The google account used for the Google Sheets integration with Petavue must have the Owner or Editor permission of the sheet containing the GA4 reports for this integration to work.


Adding Multiple Reports


You can add several reports to the same Google Sheet to pull different sets of data.


  • To add another report, simply repeat the process in Step 2. Each new report will be added as a new row in the Report Configuration tab.


  • When you run the reports again (Step 3), the add-on will execute all configured reports, refreshing the data in their respective tabs.

Scheduling Automatic Refreshes


To ensure your data in Petavue is always up-to-date without manual intervention, you can schedule the reports to run automatically.


To schedule automatic refreshes, perform the following actions:


  1. Navigate to Extensions → GA4 Reports Builder for Google Analytics™ → Schedule reports.


  2. In the pop-up window, check the box to Enable reports to run automatically.


  3. Choose the desired frequency (daily, weekly, etc.) and the time of day for the refresh to occur.


  4. Click Save.


Finalizing the Sync to Petavue


The integration with Petavue relies on its connection to this Google Sheet. Whenever the data in your report is updated (either through a manual run or an automated schedule) the changes are saved to the Google Sheet. 


Note: Petavue automatically syncs with this sheet once every 24 hours. This means your GA4 data in Petavue will reflect a daily snapshot, not a real-time view.


You can now log into Petavue to analyze and perform drill-downs on your latest GA4 data. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us