Skip to main content

Google Analytics 4

This article gives you a step by step guide on how to setup Google Analytics 4 with your clickflow and information on all events

Heyflow avatar
Written by Heyflow
Updated this week

⭐ Available on the following plans: Basic, Pro, Agency, Business

👀 Not sure which plan you're on? Check your subscription here.

For advanced analytics and in-depth insights, Heyflow integrates seamlessly with Google Analytics 4. This integration ensures that users can harness the full power of number one tracking tool to understand user behavior and make informed decisions.

This article covers

Heyflow-Screenshot – Tracking


Setup

Set up your Google Analytics account

💡 Tip: If you’re new to Google Analytics 4 and just finished naming your account, skip ahead to Step 4 – creating a new property.

  1. Open Google Analytics and click Home in the left sidebar.

  2. Click Admin in the bottom-left corner of the window.

  3. Click Create and choose Property.

  4. Enter the relevant details for your new property and click Next. (The property name is just an internal identifier - you can get creative!)

  5. Fill in any remaining optional information and click Create.

Create your data stream

  1. Select Web as the platform to set up a data stream.

  2. Set up your stream by entering your website URL and a stream name (e.g. heyflow.site/<your-flow-id/path>). For the Stream name, you can get creative – that’s just for you to identify the stream. How about “My first Heyflow”? Turn Enhanced Measurement on or off based on your needs, then click Create Stream.

🔎 Enhanced Measurement allows you to track more user interactions (like scrolls and site search) beyond basic page views. For most use cases, Page Views alone give you a solid understanding of how users interact with your flow. In this guide, we’ll continue with only Page Views enabled.

Connect Heyflow with Google Analytics

  1. Once your stream is created, copy the Measurement ID shown at the top right of the stream details page.

  2. Open your flow in app.heyflow.com and navigate to Integrate > Analytics in the top navigation.

  3. In the Google Analytics 4 section, paste the Measurement ID and click Save.

💡 If saving doesn’t work, try disabling your ad blocker and try again.

Publish and start analyzing

  1. Click Publish in the top-right corner of the Heyflow editor.

  2. You can now analyze your flow’s data in the main Google Analytics dashboard. Note that it might take 24–48 hours for the first data to appear.

Important: Google Analytics 4 tracking only starts working after you save your integration and publish your flow.

Great! You are now all set to use Google Analytics 4 for any reports or analysis of your data. Please allow 24-48 hours for the data to be collected and displayed in your Google Analytics dashboard.

🔎 You can also set up Google Tag Manager along with your Google Analytics 4. Navigate to our Google Tag Manager Setup page for more details!


Events

This guide is only applicable to Tracking Version 1.0 and above. Make sure your heyflow is using Version 1.0 in your heyflow settings under tracking:

Triggers and Event Names

By default, (if you don't use your own Google Tag Manager), Google Analytics 4 (GA4) events are closely related to the Heyflow Events API and the DataLayer. Check out the respective guides to gain more in-depth knowledge.

Based on your heyflow's lifecycle, events are emitted and passed to Google Analytics 4:

GA4 Event Name

heyflow-init

heyflow_start

heyflow-screen-view

page_view

heyflow-submit

heyflow_submit

heyflow-exit

heyflow_exit

heyflow-input-click

{{Custom Event Name*}}

heyflow-button-click

{{Custom Event Name*}}

The Custom Event Name that is passed as the Event Name to GA4 when an input or button is clicked (heyflow-input-click, heyflow-button-click), is set in your heyflow:

If that's not available, the following applies: for heyflow-input-click, the Custom Event Name fallback is the sanitized* System Label, Label, or block ID. For heyflow-button-click, the Custom Event name fallback is the block ID.

*) sanitized here means that it's cleaned of special characters and whitespaces, e.g. My System L@b3lMy_System_l_b_l. That's done for better compatibility with GA4 and other tools you might want to use.

Default Properties

By default, IP addresses are anonymized (anonymize_ip: true).

For all events, we define page_location, page_title, and page_referrer.

🔎 If you would like to change the schema, you can set up and link your own GTM container with custom properties. We supply a base configuration for you to start from.

page_referrer

For heyflow_start, the referrer is the HTTP referrer, e.g. https://google.com. For other events, including page_view, the referrer is the constructed URL of the last screen (explained below).

page_title

The page_title is the name of the screen.

page_location

The page_location schema is the following:

{{Origin}}{{Page Path}}/{{Screen Name}}{{Search Query}}.

❗ Important: We re-construct the page_location – it is not the actual URL. That is beneficial because your heyflow is a so-called Single-Page Application for which page_view and their location are not ideally tracked automatically.

Origin is the first part of the URL, e.g. https://heyflow.id. Page Path is only relevant when you have connected your own domain or when you have embedded your heyflow: for https://your-domain.com/some/sub/page, the Page Path is /some/sub/page. Then, after a /, the screen name follows, e.g. start (the word behind the # in the URL, usually). You can define the screen names in your heyflow yourself. The Search Query is whatever follows the URL with a question mark, e.g. in https://heyflow.id/my-flow?utm_campaign=spring01&gclid=abc123 Sometimes, it's also called Query String. That Search Query may contain URL parameters, e.g. utm_campaign or gclid.

A few examples for the page_location reconstruction:

Original URL

page_location

https://heyflow.id/my-flow

https://heyflow.id/my-flow

https://heyflow.id/my-flow#screen-name-abc

https://heyflow.id/my-flow/screen-name-abc

https://heyflow.id/my-flow#screen-xyz?utm_source=google&gclid=abc123

https://heyflow.id/my-flow/screen-xyz?utm_source=google&gclid=abc123

https://your-domain.com/#start-screen

https://your-domain.com/start-screen

https://your-domain.com/some/sub/page#some-screen

https://your-domain.com/some/sub/page/some-screen

https://your-domain.com/some/sub/page#some-screen?utm_source=google&gclid=abc123

https://your-domain.com/some/sub/page/some-screen?utm_source=google&gclid=abc123


Troubleshooting

I don't see any events in GA

Make sure you do not decline the Cookie Consent when testing the events in your heyflow and try disabling ad blocker and other extensions.

💬 If you're having any other issues with our Google Analytics integration, please contact the support.

Did this answer your question?