4 steps to capture Google Analytics data in Netlify Forms
By following these 4 simple steps, you'll be able to capture Google Analytics data with each submission of your Netlify forms, so you can clearly see where your leads are coming from.

Did you know that 62% of marketers struggle to track the exact source of their leads?
While Google Analytics provides great insights into where your website visitors are coming from (e.g., Paid Search, Paid Social, Organic Search), it can't show how many leads and customers each of those channels are bringing.
But by capturing Google Analytics data with each submission of your Netlify and sending it to your CRM and other tools, you'll be able to run reports that show exactly where your leads and customers are coming from.
In this article, we’ll walk you through how to use a tool called Attributer to capture Google Analytics data with each submission of your Netlify forms.
What is Attributer?
Attributer is a small snippet of code that you add to your website.
When someone visits your site, Attributer determines where they came from and groups them into various channels (such as Paid Search, Paid Social, Organic Search, etc.), similar to what you see in Google Analytics.
When a visitor completes a lead capture form on your site (such as a Contact Us form or Request a Quote form), Attributer automatically writes the source data into hidden fields on the form.
Finally, when the visitor submits the form, the Google Analytics-style data is captured in Netlify, along with their name, email, and other details.
You can then:
- View it directly in your Netlify dashboard.
- Include it in the email notifications you receive when a new form is submitted.
- Send it to your CRM or a spreadsheet to run reports showing where all your leads and customers are coming from.
4 steps to capture Google Analytics data in Netlify Forms
Using Attributer to capture Google Analytics data in Netlify forms is easy. Here's how to do it in 4 steps:
1. Add hidden fields to your forms
As the name suggests, hidden fields are form fields that exist on your form but are not visible to visitors. These fields allow tools like Attributer to input information into them without the user noticing.
The hidden fields you’ll need to add are:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
Detailed instructions on adding these hidden fields can be found here.
2. Attributer automatically fills the hidden fields with Google Analytics data
When a visitor completes a form on your website, Attributer writes the Google Analytics data on where they came from into the hidden fields on the form.
For example, let’s say you’re a marketer at Shopify and you're running Google Ads to promote Shopify’s e-commerce platform.
If someone clicks on one of your ads and submits a form on your site, Attributer would populate the hidden fields as follows:
- Channel = Paid Search
- Channel Drilldown 1 = Google
- Channel Drilldown 2 = Ecommerce Campaign
- Channel Drilldown 3 = Shopify
Additionally, Attributer would capture the visitor’s initial landing page (e.g., www.shopify.com/tools/ecommerce) and the associated landing page group (e.g., /tools).
3. Google Analytics data is captured by Netlify Forms
When the visitor submits the form on your site, the Google Analytics data that Attributer wrote into the hidden fields is captured by Netlify forms, along with the information the lead entered into the form (such as their name, email, phone number, etc.).
4. Run reports to see what's working
Now that you have the data on where each lead originated, along with their name, email, and other details, you can take several actions with it:
- View the source data for each lead directly in your Netlify dashboard
- Include the lead source information in your new lead notification emails.
- Send the data to your CRM (like Salesforce, Hubspot, Pipedrive, etc.) or a spreadsheet, and run reports to identify which channels are generating the most leads.
What data gets captured in Netlify Forms
When using Attributer to capture Google Analytics data in Netlify forms, you get two main pieces of information:
1. Channel
Attributer tracks where each lead comes from (e.g., Organic Search, Paid Search, Paid Social, Referral, and more).
For certain channels, it also provides additional details such as the campaign, ad group, keyword, and other relevant data. You can learn more here.
1. Landing page
In addition to tracking the channel through which visitors arrive at your site, Attributer also captures data on the content that drew them in.
This includes the initial landing page (e.g., shopify.com/tools/ecommerce) and the landing page group (e.g., /tools).
3 example reports you can run when you use Attributer to capture Google Analytics data in Netlify Forms
If you use Attributer to capture Google Analytics data in Netlify forms, and send it to your CRM or a spreadsheet, you’ll be able to generate reports like the ones below:
1. Leads by Channel
This report gives you a clear overview of which channels (e.g., Paid Search, Paid Social, Organic Search, etc.) are driving the most leads for your business.
It’s an essential tool for deciding where to allocate your resources.
For instance, if you find that Organic Search is generating most of your leads, but you’re spending a large portion of your budget on Paid Search, it could be time to reassess your strategy and reallocate funds.
2. Opportunities by Google Ads campaign
When you’ve got multiple campaigns running in Google Ads, this report makes it easy to spot which ones are actually generating real sales opportunities for your business.
With that insight, you can confidently put more budget behind the campaigns that are working and hit pause on the ones that aren’t delivering.
3. Customers by Facebook Ads Network
If you're running ads on Facebook, your ads are likely appearing across the different social media platforms Facebook owns (e.g., Facebook, Instagram, Messenger, WhatsApp).
In that case, the report above, showing how many customers you’ve acquired from each network, can help you determine which platform is most effective for your business and where you should focus your budget.
Wrap up
Attributer is the most efficient way to capture Google Analytics data with each submission of your Netlify forms.
You can then view the data in your Netlify dashboard, include it in your new lead notification emails, send it to your CRM, and more.
The best part? It's free to get started, and the setup takes just 10-15 minutes. Start your 14-day free trial today!
Get Started For Free
Start your 14-day free trial of Attributer today!
About the Author
Aaron Beashel is the founder of Attributer and has over 15 years of experience in marketing & analytics. He is a recognized expert in the subject and has written articles for leading websites such as Hubspot, Zapier, Search Engine Journal, Buffer, Unbounce & more. Learn more about Aaron here.