Search documentation...

ChangelogBook a demoSign up

Google Analytics

Send events directly to Google Analytics from your data warehouse

Supported syncing

TypeDescriptionSupported Sync ModesAPI Reference
EventsSync events to GA4 via the Measurement Protocol APIInsertMeasurement Protocol Reference

For more information about sync modes, refer to the sync modes docs.

Connect to Google Analytics

Go to the Destinations overview page and click the Add destination button. Select Google Analytics and click Continue. You can then authenticate Hightouch to Google Analytics by entering a Google Analytics API Secret.

To generate an API secret, navigate to Admin > Data Streams > choose your stream > Measurement Protocol > Create. If you don't have any existing data streams you need to create one first.

Sync configuration

Once you've set up your Google Analytics destination and have a model to pull data from, you can set up your sync configuration to begin syncing data. Go to the Syncs overview page and click the Add sync button to begin. Then, select the relevant model and the Google Analytics destination you want to sync to.

Syncing events

Hightouch supports sending following Google Analytics event types:

  • Firebase App Events
  • Gtag.js Events

Firebase app events require an associated app instance ID (app_instance_id), which you can retrieve through the Firebase SDK. The app_instance_id isn't the same as your firebase_app_id. The firebase_app_id identifies your app uniquely, whereas app_instance_id identifies a single installation of the app uniquely.

Gtag.js events require an associated client ID, which you can find in Admin > Data Streams > choose your stream > Measurement ID.

Refer to Google Analytics required parameters for more information.

To ensure syncs send each event, your event model must use a truly unique primary key. See the events syncs documentation for more information.

Measurement ID

Your Google Analytics is an identifier for a web data stream. It typically starts with UA, MO, or G followed by 10-20 characters, for example UA-12345678-9. You can find your measurement ID by following the Find your Measurement ID link in Google's docs.

Event name

Google Analtyics requries an event name for all events. You can either provide a static value or select to use a column from your model data. Hightouch syncs the static or column value as the events[].name parameter Google Analytics requires. See Google's events reference for all event name options.

Field mapping

Field mapping is where you select which event parameters you want to send to Google Analytics. You can map data from any of your model columns to event parameters in Google Analytics. Ensure the your model column data type matches the data type of the parameter you want to sync to.

Different event types require different parameters. For example, purchase events require the following parameters:

  • currency (string)
  • value (number)
  • transation_id (string)

Field mapping in the Hightouch UI

You can use Hightouch's advanced mapper to map column, variable, and static values, for example, "USD" for currency.

See Google's events reference for the suggested parameters for each event.

Tips and troubleshooting

Common errors

To date, our customers haven't experienced any errors while using this destination. If you run into any issues, please don't hesitate to . We're here to help.

Live debugger

Hightouch provides complete visibility into the API calls made during each of your sync runs. We recommend reading our article on debugging tips and tricks to learn more.

Sync alerts

Hightouch can alert you of sync issues via Slack, PagerDuty, SMS, or email. For details, please visit our article on alerting.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Last updated: Apr 20, 2023

On this page

Supported syncingConnect to Google AnalyticsSync configurationSyncing eventsTips and troubleshootingCommon errorsLive debuggerSync alerts

Was this page helpful?