Use Google Analytics to track Google Form submissions
Asked Answered
A

8

18

I'm using Google Forms (a Google Doc spreadsheet with an automatically generated form that the user can fill in to submit their details) and would like to track the submission of the form as a virtual pageview in Google Analytics so that I can measure conversions. Does anybody know if this is possible?

Aliunde answered 4/2, 2011 at 20:51 Comment(4)
Where is the form housed? On the Google Docs page? In an Iframe? You could pull this off if you just copy the form HTML and put it into a page, and then put in form tracking code.Undeviating
You can now simply use GFormAnalytics. It will generate a new link for you and then you can track your forms with your own Google Analytics tracking code. Check it out here: GFormAnalytics.comBamford
@KevinGoedecke your form on GFormAnalytics returns 404 Not Found nginxBursitis
Oh my god, thanks so much. I fixed it!Bamford
U
14

While Crayon Violent is correct about the built-in capabilities, there is a viable option: If you're able to host the Google Form HTML on one of your own pages, you can treat it like any other form (you can literally copy and paste the form HTML from the form page). As long as you leave the inputs unmodified, and the form action remains as its presented, it will post successfully to the form, regardless of where it is hosted from. (You can remove the styling elements if you wish.)

You can see a sample of that here: http://jsfiddle.net/PVBqX/2/

And you can see the data record just fine in the Google Spreadsheet here.

And, if you use Firebug or Webkit inspector, you'll see that the virtual pageview is sent: Screenshot of __utm.gif hit generated

Undeviating answered 6/2, 2011 at 1:17 Comment(3)
That could work... The "Google hosted google docs" thing, as you describe it, just comes in the form of an iframe, so there's technically nothing stopping you just grabbing the source code. So long as they don't change anything behind the scenes at any point.Aliunde
I haven't tried it, but rather than copying the HTML, maybe you can use the EMBED button on the "Send Form" popup?Isthmus
@Isthmus that's an iframe on a different domain; you can't track submissions there.Undeviating
F
3

There is an alternative solution to track pageview in Google Analytics using an image impression inside the Google Doc which I have been using it in my spreadsheet.

Check out the following link for the guide of explanation on how this works:
Tracking-google-sheet-views-with-google-analytics

For example, using little Apps Script will include the sheet key and locale in the image url (to include this you your own project open you Sheet and then Tools > Script editor and paste the code in):

function getGABeacon(tid){
  var id = SpreadsheetApp.getActiveSpreadsheet().getId();
  var locale = SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetLocale();
  return 'https://ga-beacon.appspot.com/'+tid+'/sheets/'+id+'/'+locale;
}

Then in the Sheet we can then use the cell formula like =image(getGABeacon("UA-48225260-1"))

tracking-google-sheet-views-with-google-analytics

EDIT

You can also build a tracked URL and pass it to the beacon on targetted page using this function

var trackURL = SpreadsheetApp.getActiveSpreadsheet().getUrl();
Frediafredie answered 29/5, 2015 at 3:15 Comment(1)
Would this work to track submission of the form, or merely that the form was opened?Aliunde
V
3

Probably you should just use Url shortner tool like https://goo.gl/ or https://bitly.com/ to get analytics on how many clicks are made and little bit of analytics like locations, browsers etc through them.

Vardar answered 1/1, 2016 at 11:17 Comment(0)
B
1

You can add Google Analytics in general by setting up a new page which includes the form using an iFrame and then adding the Google Analytics tracking code right before it.

I found a service that does exactly that and is completely free. It's called GFormAnalytics. It will generate a new link for you and then you share that new link and it will track your forms with your own Google Analytics tracking code.

Check it out here: https://GFormAnalytics.com

Bamford answered 29/1, 2020 at 11:37 Comment(0)
C
0

If you Edit the Form and select Responses menu, then select enter Tracking ID, paste in your tracking ID in and you will get page views as he goes to each page including the confirmation page which has Page Title of "Thanks!". This works even putting the link to the form in an email. Works great, tracking the mail open, then the pages and submit of the form, but I haven't figured out how to pass the user ID so both types of events carry the same user ID.

Chaldean answered 6/10, 2017 at 9:33 Comment(1)
"Enter tracking ID" does not appear to be on the Responses menu, as of Aug 2018; is this a feature that was removed in last 12 months?Ionopause
W
0

Here is what I did using Zapier (free basic plan), no coding needed:


How to use Zapier to trigger a goal conversion in Google Analytics (used with Google Tag Manager) when an embedded Google Form is completed

  • In Google Tag Manager click on Triggers to create a new trigger.
  • For trigger type, select "custom event."
  • Set it to trigger on "Some Custom Events."
  • Set the trigger to fire when the Page URL contains a unique part of a URL e.g. "/pages/contact."
  • Name (e.g. "Contact Form Submitted" and save the trigger.
  • Click on "Tags," then click "New" to create a new tag.
  • For tag type select "Universal Analytics."
  • For Track type select "Event."
  • Under "Event Tracking Parameters" for "Category" enter "Form Submission."
  • For "Action" enter "Submitted."
  • For "Label" enter "Contact Form."
  • Leave "Value" blank.
  • Under "Non-Interaction Hit" select {{Event}}
  • Under "Google Analytics Settings" select {{Google Analytics}}
  • As the trigger for this tag select the trigger you just created, "Contact Form Submitted" (or whatever you named it in step 5) which should show as a custom event.
  • Name the tag (e.g. "Contact Form Submission") and save.
  • Press "Submit" in the upper right corner to activate the new tag.
  • In Google Analytics, select the gear icon in the bottom left (Admin settings).
  • Under "View" select "Goals."
  • Select "Create New Goal."
  • Select the "Submission" goal template in step 1.
  • In step 2, under "Type," select "Event."
  • In step 3, for "Category," "Action," "Label" enter exactly the same thing you did in Tag Manager in steps 9-11 (case sensitive).
  • Leave "Value" blank.
  • Save the goal.
  • In Zapier, select "Make a Zap!"
  • For the Trigger App, select "Google Forms."
  • Select "New Response in Spreadsheet."
  • Connect your Google Forms account.
  • Choose the spreadsheet connected to your form.
  • Under "Worksheet" choose the "Form responses" that shows up in the drop down menu.
  • Select "Google Analytics" as your action app.
  • Select "Create a Measurement."
  • Connect your Analytics account.
  • Select your Account and Property.
  • Under "Type," select "Event."
  • For "Category," "Action," "Label" enter exactly the same thing you did in Tag Manager in steps 9-11 (case sensitive).
  • Leave the other fields blank.
  • Test and activate the zap.
  • Go to your website and fill out the form.
  • After at least 15 minutes (enough time for Zapier to have checked the spreadsheet linked to your form) check your goal conversions in Google Analytics to verify that the zap is working.
  • Winsor answered 18/7, 2018 at 2:25 Comment(1)
    Set the trigger to fire when the Page URL contains a unique part of a URL e.g. "/pages/contact." - This URL should be the url of Google Form?Enervate
    P
    -1

    not possible. You have to be able to add code to the actual file being served.

    Only thing I can think of is if it lets you redirect to one of your own pages after form submission, put the code on a page you create on your own site

    Politico answered 5/2, 2011 at 4:14 Comment(0)
    G
    -1

    I think embedding the form via iframe and tracking via analytics is the best way possible.

    There are services out there that can help you do that. I like https://www.trackyourform.com, as it was pretty straightforward and I could to it with minimal technical know-how. This also has a free trial and pretty nominal charges (< $0.5) afterwards.

    Guertin answered 18/7, 2023 at 6:42 Comment(0)

    © 2022 - 2024 — McMap. All rights reserved.