Solved

How To Track Form Submissions in Google Analytics 4


Badge +3

Hey there, can someone tell me how can I track form submissions in Google Analytics 4?

Is this something that I can achieve or not technically possible?

I’m familiarized with GA4 and Google Tag Manager, also configured GA4 in Shopify and have Klaviyo script running on all my pages, it’s working with UA but not in GA4...

Please help! 🙏🏽

icon

Best answer by Brian Turcotte 6 June 2023, 21:58

View original

15 replies

Badge +3

Hi all!

I was able to solve this, here is the link to the article that worked for me: https://www.muckypuddle.com/blogs/news/tracking-klaviyo-signups-in-ga4

 

Thanks all for your help and hope you find this usefull.

Userlevel 7
Badge +35

Hi @lfernandez!

No updates yet, but I can assure you this is on our Product Team’s radar so I have the thread marked for update if anything changes!
 

Best,

Brian

Userlevel 7
Badge +35

Hi @lfernandez!

I’ll forward this feedback to our Product Team, and I’ll update the thread if anything changes regarding GA4!

 

Best,

Brian

Just as an update
if you use the gtag code from here as is
https://help.klaviyo.com/hc/en-us/articles/115005077027

it will track any embedded forms in a basic way with ga4
assuming there are no js errors etc on site

however if you have forms e.g. from shopify theme / app etc
you’ll need to make your own event listeners / send your own events on form submit etc

personally I think the event parameters are a waste of space so you want want to chunk them out into separate events e.g. 

- we ditched form open and form closed as means nowt to us
- but moved form id to be in the event title
- fewer events but more meaningful to us to know as form id in reports 

so yeah
klaviyo’s docs are correct when you use the gtag code
but they should clearly state it’s for GA4
and I’d advise moving data into event name instead of parameters as it will make reporting more meaningful / permanent
 

We’ve done a lot of work converting things over to GA4 

In theory you should be able to use the gtag code from here modified slightly
https://help.klaviyo.com/hc/en-us/articles/115005077027

that looks like a 10 min job to modify that tbh to send data to ga4
but needs testing etc

I will post an update here when done if I remember - scheduled to do next week on a site

the event structure is slightly different on GA4 and I’d advise sending individual events where possible and ignoring event parameters like there on that guide (purely from a reporting point of view this makes life easier - we have backtracked on event parameters in ga4).
 

 

Userlevel 4
Badge +10

Hi @lfernandez I’m getting familiar with GA4 myself right now but I believe the form submission is tracked automatically as an event called form_submit, and then in the properties of the event, you can see the parameters. What happens when you filter those, like by form_destination, in your account? Does that get you what you need to save a custom event for the Klaviyo form?

 

Granted, I’m still learning as well, so please let me know what you think.

 

Userlevel 4
Badge +10

@lfernandez Yea I did a little more digging and maybe this thread from a few months ago will help: 

 

Badge +3

@Brett from Gatsby Thanks Brett! I’ve already looked into that thread, but couldn’t find any solution to this, could you?

Userlevel 4
Badge +10

Sorry unfortunately I haven’t either

Badge +3

Hi @Brian Turcotte !

Is there any news from the DEV team on this?

I’m seeing that this article is still talking about UA, which will no longer track data soon https://help.klaviyo.com/hc/en-us/articles/115005077027

Need help with this soon, please!

Thanks,

Lucas

Userlevel 7
Badge +35

Hi @Liquify!

Thanks so much for the feedback - I will forward this feedback to our Documentation team accordingly!

 

Best,

Brian

Badge +3
  1. Set Up Google Analytics 4: Make sure you have a Google Analytics 4 property set up for your website. If you haven't set up GA4 yet, you can create a new property in your Google Analytics account and follow the instructions provided by Google.

  2. Install the Global Site Tag (gtag.js): Add the Google Analytics tracking code to your website's pages. This code, also known as the Global Site Tag (gtag.js), allows you to track various user interactions, including form submissions. Place the tracking code within the <head> section of your website's HTML code. Ensure that the code is added to all pages where you want to track form submissions.

  3. Add Event Tracking to Form Submission: Identify the form on your website that you want to track submissions for. Add an event tracking snippet to the form submission code. For example, you can use JavaScript to listen for the form submission event and trigger the tracking code. Here's an example of how to do this using JavaScript:

  4. Verify Tracking in Real-Time: After implementing the event tracking code, you can verify if the form submission events are being tracked correctly in real-time. Open your website and submit the form. Then, in your Google Analytics account, go to the Real-Time section, and navigate to Events to check if the form submission events are being recorded.

  5. Create Custom Reports and Goals (Optional): In Google Analytics 4, you can create custom reports and goals based on the form submission events to gain deeper insights into user behavior and conversions. Explore the Google Analytics interface to set up custom reports or goals that align with your tracking needs.

Hi zaliasber, 

That seams something generated from an AI, and also the link you placed looks spammy.

Thanks anyway.

Userlevel 7
Badge +35

Hi @lfernandez!

Have you seen this Help Center article?

 

Although Google Analytics 4 ushered in some changes, this might be a good place to start and gather some context.

 

Best,

Brian

Badge +3

Hi @Brian Turcotte !

 

I’ve seen that article, it’s working for UA but still not getting information in GA4.

 

Thanks!

Badge +3

I thought the same about form submissions tracked automatically but take a look at all the events I have on GA4 for that account:
 

 

I don’t know why it’s missing and when I configure that event with a custom event from Google Tag Manager it doesn’t either appear. It’s weird because I’ve configured other events like “internal_link_click” the same way but this is not working for me.

Let me know if something else I may be missing.

 

Thanks!

Reply