Google Analytics 4
Track Klaviyo form submissions, popup conversions, and email-driven traffic in Google Analytics 4. This guide covers tracking Klaviyo forms on your website and connecting email campaign data to GA4.
Prerequisites
- Klaviyo account
- GA4 property with Measurement ID
- Klaviyo forms embedded on your website
- GTM (recommended for advanced tracking)
Track Klaviyo Form Submissions via GTM (Recommended)
Use Google Tag Manager to track when visitors submit Klaviyo forms. This is the most reliable method.
Identify Klaviyo Form Events
Klaviyo forms emit JavaScript events when submitted
The main event to capture is form submission success
We'll create a Custom Event trigger in GTM
Create Custom HTML Tag for Event
In GTM, go to Tags > New
Choose 'Custom HTML'
Add code that listens for Klaviyo submit events
<script>
// Listen for Klaviyo form submissions
window.addEventListener('klaviyoForms', function(e) {
if (e.detail.type === 'submit') {
// Push to dataLayer for GTM
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'klaviyo_form_submit',
'form_id': e.detail.formId,
'form_type': e.detail.metaData.$source || 'popup'
});
}
});
</script>Set Trigger to All Pages
Set trigger to 'All Pages'
This listener will activate on any page with Klaviyo
Save the tag
Create GA4 Event Tag
Tags > New > Google Analytics: GA4 Event
Enter your Measurement ID
Event Name: 'generate_lead' or 'klaviyo_signup'
Add parameters: form_id, form_type from dataLayer
Create Custom Event Trigger
Triggers > New > Custom Event
Event name: 'klaviyo_form_submit'
Apply this trigger to your GA4 Event tag
Save and publish GTM container
Mark as Conversion
In GA4: Admin > Events
Find 'generate_lead' or your custom event
Toggle 'Mark as key event' ON
Conversions now track in GA4
Best Practices
Do
- Use GTM for reliable form tracking—Klaviyo events are consistent
- Mark form submissions as conversions in GA4
- Ensure UTM tracking is enabled for all campaigns
- Test popup and embedded forms separately
- Use event parameters to distinguish form types
- Compare Klaviyo analytics with GA4 for discrepancies
Don't
- Assume default page tracking captures form submissions
- Forget to publish GTM after making changes
- Use hard-coded event names—use dynamic form_id
- Ignore email UTM attribution in GA4
- Only rely on Klaviyo analytics—use GA4 for customer journey
Verification Checklist
- Submit a test form and check GA4 Realtime
- Verify event appears in GA4 Events report
- Use GTM Preview mode to test event firing
- Send test email, click link, verify UTM in GA4
- Check Klaviyo native analytics matches form submissions
Pro Tips
- Segment GA4 data by form_id to compare popup vs embedded form performance
- Create a GA4 Exploration for 'Email to Signup' conversion funnel
- Use Klaviyo's revenue tracking + GA4 for full attribution picture
- Set up automated reports comparing Klaviyo and GA4 signup numbers
- Track 'add_to_cart' events from email clicks for ecommerce stores
- Create audience based on klaviyo_signup event for remarketing