Google Analytics 4 Server-Side

This destination uses the Google Analytics Measurement Protocol which provides a more limited API than a direct Google Analytics integration. Unless you want to send data to Google Analytics through the Freshpaint HTTP API we recommend you use the Google Analytics 4 Proxy integration instead.
If you are interested in migrating from native GA4 to running GA4 in Freshpaint, check out our step by step migration guide.
Google Analytics 4 is an analytics service that enables you to measure traffic and engagement across your websites and apps. GA4 uses GA4 properties, or sets of Google Analytics reports and data, which are designed for the future of measurement in the following ways:
  • Collection of both website and app data to better understand the customer journey
  • Use of events instead of session-based data
  • Privacy controls are included such as cookie-less measurement, and behavioral and conversion modeling
  • Predictive capabilities offer guidance without complex models
After sending Freshpaint data to Google Analytics 4, you'll be able to analyze the data in order to identify trends and patterns in how visitors engage with your website(s).
Learn more about Google Analytics 4 here.

Destination Info


Getting Started

To set up the GA4 (Google Analytics 4) integration, you need the following:
  1. 1.
    Measurement ID: You can find the measurement ID in the Google Analytics UI under: Admin > Data Streams > choose your stream > Measurement ID.
  2. 2.
    API Secret: An API SECRET is generated in the Google Analytics UI. To create a new secret, navigate to: Admin > Data Streams > choose your stream > Measurement Protocol > Create
Next, go to the Google Analytics 4 configuration page in Freshpaint and click Configure. Then, configure the app credentials by providing your Measurement ID and API Secret into Freshpaint.
That's it! Google Analytics 4 is now ready to be used as an event destination.


Once the GA4 integration is enabled, you can now set it as an event destination:
All events will be sent to GA4 from Freshpaint's servers. Your website will not send data directly to GA4. Instead, your website and all other sources will send data to Freshpaint, which is translated then sent to GA4. Sources such as React Native, Android, and iOS send data server-side.
Freshpaint will send your data server-side to Google’s Measurement Protocol API.
Events sent from Freshpaint to GA4 will show up as standard GA4 events. From there you can use your events in any of the GA4 reports and use it to generate insights into your business.
The fastest way to confirm if the integration is working is to:
  1. 1.
    Send an event to GA4 via the toggle like in the screenshot above
  2. 2.
    Trigger the event you just toggled to send to GA4
  3. 3.
    Wait a few minutes, then check GA4's Realtime overview for the events. To navigate here, go to Reports > Realtime and scroll down to view the events:


Page View Events

Freshpaint will automatically send a page_view event to Google Analytics. This page view event will behave the same as the native Google Analytics page_view event.
Manually sending a page view event to Freshpaint by calling is not currently supported.

GA4 Event and Property Naming Conventions

GA4 will only accept GA4 event/property names that follow a certain convention. Valid GA4 event and property names:
  1. 1.
    Contain only alphanumeric characters & underscores
  2. 2.
    Start with a letter
Don't worry! If you provide an invalid event/property name, Freshpaint will handle this for you. We will replace all characters other than the alphanumeric & underscores, with underscores, and if the event/property name doesn't start with a letter, we will prefix it with 'FP_'.

Making the switch to Google Analytics 4

Google Analytics 4 is fully equipped to support your measurement needs today and into the future. Google will be turning down Universal Analytics, so it is recommended you to make the switch to Google Analytics 4 as soon as possible. To get help in migrating to GA4, you can refer to Google's docs here.
On July 1, 2023, standard Universal Analytics properties will no longer process data. You'll be able to see your Universal Analytics reports for a period of time after July 1, 2023. However, new data will only flow into Google Analytics 4 properties.

Differences Between Native Google Analytics 4 and Freshpaint Google Analytics 4

Out of the box there will be some differences between a native Google Analytics 4 integration and a Freshpaint Google Analytics 4 integration. These are currently the following:
  • No geolocation information - For the moment events sent from Freshpaint to Google Analytics will not have geolocation information attached to them. We are currently working on adding support for geolocation information in Google Analytics.
  • Realtime overview will not show users currently on the page.
  • Time on page not captured out of the box.
  • ​Enhanced event measurement not supported out of the box. If you have enhanced event measurement enabled, a native Google Analytics integration will capture a number of events out of the box that Freshpaint does not. If you are interested in capturing these events, contact [email protected] for assistance in capturing the properties.
  • URL path not sent to Google Analytics by default. For non-pageview events, Freshpaint will by default not send the path of the event to Google Analytics. To add the URL path to your events, you can use a send built-in property transformation.

Configuration Settings

Event Transformations

Set up transformations to modify your data before it's sent to your destination. Read more about transformations here.