Track Google Form Views with GA4 & Marketing Pixels
Tags: googleanalytics, ga4, googleform
Published: 2023-04-15 08:25:48

Do you want to know **how many visitors visit your Google Form?** - In this tutorial I explain how to use **Google Analytics** to track visits to a Google Form to measure engagement and form views. After that, we'll learn how to use the visits for **Google Ads campaigns**.

I'll also show how, using the same principle, you can implement other **Tracking Pixels** from **Facebook, Linkedin or Twitter** on the form to target visitors through **Retargeting Campaigns**, for example.

As a Google Analytics consultant I have set up tracking for Google forms quite a few times. So I will explain you why it is smart to track your form with additional **tracking tools** and what the advantages are.

## Why is it important to track Google Form attendance with GA4?

[Google Forms](https://docs.google.com/forms/u/0/) are an attractive solution to create online forms for websites. By March 2023, Google Forms is used by [0.26%](https://trends.builtwith.com/widgets/feedback-forms-and-surveys/traffic/Entire-Internet) of websites across the Internet as a solution for feedback forms. [Popular websites using Google Forms](https://webtechsurvey.com/technology/google-forms/changes) include *washingtonpost.com*, *techcrunch.com*, and *usatoday.com*.

Why?

The **advantages of Google Forms** are:
- Free with no limits 
- Forms can be created quickly and easily in minutes
- Free upload feature
- Many templates available
- Compatible with desktop and mobile devices
- Instant access to entered data in Google Sheets
 
Tracking the individual views of a Google Form with Google Analytics or Marketing Pixels from Facebook, Linkedin or Twitter is not possible without overcoming a few technical hurdles. 

Yet it is worth it! 

Tracking individual page views of Google forms has compelling **advantages**:
1. In Google Analytics 4, you can link your conversions to your Google Ads account, for example, to run **retargeting campaigns**. This means that if you **configure the form visit as a conversion** (!), the visitors will be added to a Google Ads segement for campaigns. Thus, you can later show promotional offers to the visitors.
So, for marketing purposes, the visitors of the form are completely available.
2. You get to know how many visitors visit the form. If you subtract the number of completed forms from the visits, you know the potential of the campaign. GA4 engagement tracking additionally tells you how much time visitors spend on the form - which helps to improve the form in case visitors spend too much time filling it out.
3. By tracking with **Facebook** or the **Linkedin** tracking pixel, you can learn more about the interests or demographics of your visitors, thereby improving communication with your customer segments.

So if you combine the general advantages of Google Forms with the benefits of tracking with Marketing Pixels, Google Forms becomes a super efficient & free solution for digital campaigns with contact forms!

## How to Track Google Form Visits with GA4 

View Tracking for Google Forms in GA is achieved by embedding the Google Form Iframe together with the **Google Analytics Tracking Code** on the same page.

Since Google Analytics tracks every load of the website as a page view and the page contains the form, the views to the form can thus be tracked as well without having direct access to the form's code.

Simple, right?

Let me explain how you do this exactly, whether you have your own website or not.

### Measure attendance of Google Forms through embedding
First of all, you should always embed Google Forms in a webpage, as this will allow you to insert your own Google Analytics tracking code into the page to measure the number of visitors to the form. 
I repeat: you should **not** send the direct link to the Google Form to your users.

If you use the Google form embed code on your own website and also add your Google Analytics snippet, every **visit to the form** will be recorded as a page view in Google Analytics. 
This gives you the advantage of being able to track the **form attendance**. 

In addition, you can now also implement **Tracking Pixel** for Google Ads, Facebook, Twitter or Linkedin on the page - which would not be possible otherwise.

Don't have a website where you can embed the Google Form? That's no problem. You can create a hosted HTML page in seconds and embed the Google form in it. 

For example, use the [Basic Website starter from glitch.com](https://glitch.com/edit/#!/remix/glitch-hello-website), [Github Pages](https://pages.github.com/) or simply upload your HTML file to [Netlify](https://www.netlify.com/). Below I give an example of Glitch and Netlify.
### 1. Embedded Google Form with GA tracking on custom website
First, copy the embed code for your Google Form.

![Google Form Embed Code](https://bluerivermountains.com/static/75d85ebef484c2703b53d321ff3f36bf/google-forms-embed-code.png)

### 2. Create a single custom web page
If you already have your own website, create a new page with any address path and add the embed code. 
If you don't have your own website, follow one of the examples below.

First create an empty HTML page with a [default boilerplate code](https://www.freecodecamp.org/news/basic-html5-template-boilerplate-code-example/) and add the Google Form snippet and the Google Analytics tracking code. Then upload the file to a web host.

#### Glitch Example
- Start a new web page with the [Basic Website Starter from glitch.com](https://glitch.com/edit/#!/remix/glitch-hello-website) and add the embed code for the Google Form at the top of the `<body>`. Delete the rest of the code in the body tag.

![Insert embed code on Glitch](https://bluerivermountains.com/static/2ef40cde934c2ef1a414e93de1fa197c/google-forms-embed-code-on-glitch.png "Insert embed code on Glitch")

- **Add Google Analytics 4 Snippet**: Now add the Google Analytics snippet.

Alternatively, you could also add a GTM container snippet with a GA4 page view tag enabled.

![Insert GA4 Snippet on Glitch](https://bluerivermountains.com/static/22f584bd3f1f2813e9cc674aeaaded37/google-forms-embed-code-on-glitch-with-ga4.png "Insert GA4 Snippet on Glitch")

- **Copy the new link to your Google Form**: Next copy the link to your glitch page.

Under **Preview -> Preview in a new Window** you get the created page opened in a new browser tab. From now on use this link to invite visitors to your form.

![Copy Glitch Link](https://bluerivermountains.com/static/211f01436312fc737bb2d733831c6950/copy-glitch-link.png "Copy the newly generated link to your created HTML page with embedded Google Form.")

#### Netlify Drop Beispiel
- Create a [HTML page from a boilerplate template](https://www.freecodecamp.org/news/basic-html5-template-boilerplate-code-example/) and add the copied embed code of the Google Form to the `<body>`. Then save the file as index.html in an empty folder.
- Visit Netlify.com and log in with your preferred login service.
- After that, go visit [Netlify Drop](https://app.netlify.com/drop) and drag the folder with the index.html file into the drag & drop area.

![Netlify deployment after upload](https://bluerivermountains.com/static/ed5112c1bcec308779208f038f41cefa/netlify-deply-after-drop.png "Screenshot after you uploaded the folder with the index.html file to Netlify. The page is already hosted and online!")
![Example of the page hosted on Netlify](https://bluerivermountains.com/static/a3e32deaee79911b5598cdabc296b95f/netlify-live-example.png "Example of the page online, hosted by Netlify in just seconds")

### 3. Test if everything works
To test GA4 tracking you can simply visit the real-time report. On the events widget you can click the `page_view` event and then select the `page_location` parameter. This will show you all web addresses of the last minutes.

There you should see the URL to the page with the Google Form.

![Validation of the Google Form with real-time report in Google Analytics 4](https://bluerivermountains.com/static/fb2b4f67248fd57773f5081e07683a5f/Validation-Google-Form-with-Google-Analytics-4-real-time-report.png "When you access the real-time report in GA4, you will notice that each pageview with the Google Form is now being tracked.")


## Analysis of form views in GA4
GA4 tracks engagement metrics like [average engagement time](https://support.google.com/analytics/answer/13391283?visit_id=638167351549791683-3231046854&rd=1&hl=en) by default.

When the form is called, the engagement tracking starts automatically, so you can look at the average engagement time (time tracking) of the visitors with the form later in Google Analytics.

To create a time tracking report you then build e.g. an *Exploration Report* with the values **User Engagement** and as dimension for the rows the **Page Path**. 

Also add **views** to the values to show the total number of form visits (form attendance).

![Analysis of Google Form pageviews and engagement in Google Analytics 4](https://bluerivermountains.com/static/210400c6a05ceaac2ff35bf93a01e0cb/GA4-page-view-analysis-and-engagement.png "In the analysis of GA4 data, we can see how often the Google Form was accessed and with engagement tracking, how much time users spent on the form.")


## Track Google Form Visits with the Facebook Pixel and other Marketing Pixels (Twitter, Linkedin etc.)
Also, you can insert all sorts of marketing tracking pixels on the page as well. See here an example for the Facebook Pixel. The FB snippet is simply inserted after the GA4 snippet.

![Facebook Pixel and GA4 snippet embedded in Google Form](https://bluerivermountains.com/static/6a86ce1c73557e612c6b876c4e4d2f62/google-forms-embed-code-on-glitch-with-ga4-and-facebook.png "Facebook Pixel and GA4 snippet embedded in Google Form")

After you have implemented the Facebook, Twitter, Pinterest, Linkedin or any other pixel, you need to test if the implementation worked.

The easiest solution is to log in to the respective platform of the marketing pixel. After 24 hours at the latest you should see traffic there.

If you don't want to wait that long, there are extensions for most tracking pixel browsers that show information about the pixel when it is working.

For Facebook there is the [Meta Pixel Helper](https://chrome.google.com/webstore/detail/meta-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc).

After the extension is installed in the browser and we call the Google Form with the implemented FB Pixel, the Pixel Helper confirms that the tracking is working.

![Check Facebook Pixel Tracking in Google Form](https://bluerivermountains.com/static/e48200a616f7fa0ec946ff416629efa3/Validation-Google-Form-with-Facebook-Pixel-Debugger.png "Check Facebook Pixel Tracking in Google Form")

There are also similar Pixel Helper extensions for [Linkedin](https://chrome.google.com/webstore/detail/Linkedin-insight-tag-chec/feeednoflloccfhgoiiohjammanphoef) and [Twitter](https://chrome.google.com/webstore/detail/twitter-pixel-helper/jepminnlebllinfmkhfbkpckogoiefpd) to check the functionality of the pixel.

## Conclusion
I hope I could convince you of the importance of embedding the forms, so that you take the extra effort in the future instead of sharing the direct link.

Especially for YouTube or email campaigns, this way of quickly creating a landing page that is visually the same but offers many advantages in terms of marketing is a good idea.

We also looked at how to co-implement other tracking tools on Google Forms so that you have more metrics available for data analysis 😎.


References
[Twitter post](https://twitter.com/mattzipan/status/1646412222778732544)
[Facebook post](https://www.facebook.com/bluerivermountains/posts/pfbid0wNnygred1CczJ5EuwRL53Up7Pf2NGD22DH9jbQsGY1XApT2LanCDyq6iztkJk23jl)
[Mastodon post](https://masto.measure.chat/@arcticHunter/110190377481828437)
[Patreon post](https://www.patreon.com/posts/google-forms-81452891)