Skip to main content

How do I set up Google Analytics 4 in my AI funnel?

Learn how to connect Google Analytics 4 to your AI funnel, when it loads, and which page views and leads it receives.

Connect Google Analytics 4 to your AI funnel to see in Google Analytics how many visitors open each funnel page and how many of them become leads. Google Analytics 4 (GA4) is Google's free analytics tool, and you connect it with your Measurement ID in the Apps tab, without adding any code.

If you use a classic funnel, follow How can I track my leads in Google Analytics? instead.

TL;DR

  • Connect Google Analytics 4 in the Apps tab of your AI funnel with your Measurement ID, which starts with G-, then publish your funnel, because the connection isn't live until you do.

  • Google Analytics 4 loads on your live AI funnel only after a visitor accepts analytics cookies, and Perspective adds it to your cookie banner automatically.

  • Your AI funnel sends Google Analytics 4 a page_view for every funnel page and a generate_lead event when a visitor submits a form, without the visitor's contact details.

ℹ️ Important: Google Analytics 4 for AI funnels is available from the Grow Plan / Business Plan (Legacy) or as part of the Premium Integration Suite.

How do I connect Google Analytics 4 to my AI funnel?

To connect Google Analytics 4 to your AI funnel, you need the Measurement ID of your Google Analytics 4 property, which always starts with G-, for example "G-AB12CD34EF".

You can find it in Google Analytics under Admin > Data streams, in the data stream of your website. Google's guide to the Measurement ID shows where to click.

  1. Open your AI funnel, click Apps in the top bar, then click the three dots (...) on the Google Analytics 4 card and choose App settings.
    ​

    This shows where to open App settings on the Google Analytics 4 card in the Apps tab of an AI funnel.

  2. Paste your Measurement ID into the Measurement ID field and click Save settings.

  3. Click Publish in the top right to publish your funnel, because your Google Analytics 4 connection isn't live until you do.

Google Analytics 4 now loads on your live AI funnel for every visitor who accepts analytics cookies.

ℹ️ Only a Measurement ID that starts with G- can be saved in the settings of the Google Analytics 4 integration. A Universal Analytics ID (UA-) or a Google Tag Manager Container ID (GTM-) doesn't work in this field. To connect Google Tag Manager, follow How do I set up Google Tag Manager in my AI funnel? instead.

When does Google Analytics 4 load on my AI funnel?

Google Analytics 4 loads on your published AI funnel only after a visitor accepts analytics cookies in your cookie banner. Before that, your funnel sends nothing to Google.

Perspective adds Google Analytics 4 to the cookie banner of your AI funnel automatically, so you don't need to add it as a service yourself.

Page views and leads from before the visitor accepts aren't lost. Your funnel sends them to Google Analytics 4 as soon as the visitor accepts.

If a visitor rejects analytics cookies, Google Analytics 4 doesn't load for them. If they withdraw their consent later, your funnel stops sending data to Google Analytics 4. Google Analytics 4 only gets consent for Google's advertising features when a visitor accepts marketing cookies as well.

If you turned off the cookie banner of your AI funnel, Google Analytics 4 loads for every visitor right away.
​

Which data does my AI funnel send to Google Analytics 4?

Your AI funnel sends Google Analytics 4 two events, so you can see how far visitors get in your funnel and how many of them become leads:

  • page_view each time a visitor opens a funnel page, with the page's name as the page title.

  • generate_lead once when a visitor submits a form, without contact details such as the visitor's name or email address.

If enhanced measurement is turned on in your Google Analytics 4 property, Google Analytics 4 also records its own events, such as scrolls. A visitor's step back or forward with the browser buttons can then count as an extra page view.


​

Why isn't Google Analytics 4 showing data from my AI funnel?

If Google Analytics 4 shows no visits or leads from your AI funnel, check these points:

  • You published your funnel after saving your Measurement ID, because the connection isn't live before that.

  • You accepted analytics cookies while testing your live funnel, since Google Analytics 4 only loads after that.

  • The Measurement ID in the Apps tab belongs to the Google Analytics 4 property you're looking at.

  • Your funnel doesn't contain Google Analytics code for the same Measurement ID that you added through the AI Chat. Your funnel then leaves the page views to that code instead of sending one for each funnel page, so remove the pasted code, for example in Code Mode, and publish your funnel again.


FAQ

Which plans include Google Analytics 4 for AI funnels?

Google Analytics 4 for AI funnels is available from the Grow plan or the legacy Business plan, or with the Premium Integration Suite add-on, the same as Google Analytics 4 on classic funnels.

How do I change the Google Analytics Measurement ID on my AI funnel?

To change the Measurement ID on your AI funnel, open the Apps tab, click ... on the Google Analytics 4 card, choose App settings, replace the Measurement ID, and click Save settings. Then publish your funnel again, because your live funnel keeps sending data to the old Google Analytics 4 property until you do.

How do I remove Google Analytics 4 from my AI funnel?

To remove Google Analytics 4 from your AI funnel, open the Apps tab, click ... on the Google Analytics 4 card, choose Delete, and publish your funnel again. Perspective then also removes Google Analytics 4 from the cookie banner of your AI funnel.

Can I use Google Analytics 4 and Google Tag Manager on the same AI funnel?

Yes, you can connect Google Analytics 4 and Google Tag Manager on the same AI funnel, and each one receives your funnel's events once. If your Google Tag Manager container also loads Google Analytics 4 with the same Measurement ID, page views are counted twice, so load each Google Analytics 4 property either through the Apps tab or through Google Tag Manager, not both.

Do I need to connect Google Analytics 4 again after turning a classic funnel into an AI funnel?

No, when you turn a classic funnel into an AI funnel, Perspective carries your Google Analytics 4 connection over to the Apps tab of the new AI funnel. You can check the Measurement ID in the App settings of the Google Analytics 4 card, and the connection is live once you publish the new funnel.

Why can't I save my Measurement ID in Google Analytics 4 settings?

You can only save a Measurement ID that starts with G-, for example "G-AB12CD34EF", in the Google Analytics 4 settings of your AI funnel. A Universal Analytics ID that starts with UA- or a Google Tag Manager Container ID that starts with GTM- doesn't work there, so copy the Measurement ID from the data stream of your website in Google Analytics instead.

Did this answer your question?