How to Connect GA4
Connecting GA4 allows you to display verified web traffic and user growth directly on your project card. Because GA4 requires secure server-to-server communication, this setup requires generating a specific Service Account key.
Step-by-Step Setup:
Create a Google Cloud Project: Go to your Google Cloud Console and create a new project (or select an existing one tied to your startup).
Enable the API: Search for the Analytics Data API in the Google Cloud library and click "Enable."
Create a Service Account: Navigate to IAM & Admin > Service Accounts. Click "Create Service Account," name it, and generate a new key in JSON format. This file will automatically download to your computer.
Grant Viewer Access: Open the downloaded JSON file and copy the client_email address. Go to your GA4 Dashboard, navigate to Admin > Property Access Management, and add that email address with Viewer permissions.
Locate Your Property ID: In your GA4 Dashboard, go to Admin > Property Settings. Copy your specific Property ID. (Note: Do not use your Account ID).
Connect to Surge: Return to the Surge setup form. Enter your Property ID and upload the JSON key file.
Troubleshooting: "Invalid Credentials" Error: If your GA4 connection fails, it is almost always due to one of three issues:
Missing Permissions: The Service Account email address was not successfully added as a "Viewer" in your GA4 property settings.
Wrong ID Format: You pasted your GA4 Account ID instead of the Property ID.
Corrupted Key: The uploaded JSON file is expired, modified, or incorrect. Generate a fresh key and try again.
Last updated
