Connecting a Pertento Website to GA4
Learn how to connect Pertento to GA4, configure server-side endpoints and understand how Pertento sends variant events.
2 min read
Pertento integrates with Google Analytics 4 (GA4) to allow experiments to be evaluated using your existing analytics setup. You can connect GA4 either from the Google Analytics integration page or directly from the Websites view.
Connecting GA4
Start by authenticating through the Google Analytics page in Pertento. After granting access, Pertento automatically fetches all available GA4 properties in your account and creates corresponding website entries for each unique property.
You can also link an existing Pertento website to a GA4 property from the Websites page by selecting the property and saving the connection.
*** Please note that the GA4-integration requires edit-privileges, or higher, to function.
Server-side GA4 configurations
If the site uses a server-side GA4 implementation, you must specify the server-side endpoint URL in the Website settings. This ensures that GA4 receives the correct events. Without this configuration, tracking will be incomplete or inconsistent.
Variant impressions in GA4
Once connected, Pertento sends a unique event to GA4 for every variant impression. The event contains both the experiment ID and the variant ID. This enables clean segmentation and comparison directly inside GA4.
Variant audiences
At the moment an experiment starts, Pertento automatically creates audiences in GA4 for each variant. These audiences begin populating as visitors see variants, giving you a clear view of how each group behaves across your analytics setup.
Event collection
Pertento observes the data layer on your site and uses the existing GA4 event structure to collect metrics for experiment reporting. This allows you to rely on your established GA4 configuration without duplicating events or creating new tracking logic.
Tracking consent
Unlike Pertento’s native tracking, GA4 processes personal data. This means GA4-based experiment evaluation requires valid user consent.
If the user has not granted the appropriate analytics or marketing consent (depending on your setup), GA4 events will not fire, and experiment data will be incomplete.
Ensure your consent management platform properly controls GA4 and that users’ choices are respected before sending any GA4 events.
This also includes Pertento Runtime