4
votes

I have a page with a form. The form has four sections that you go through before you submit it, and these are all set out as tabs on the same page. I currently have google analytics tracking the page, but I was wondering if I could get it to track each section as the user reaches it/clicks on it. Is this possible?

Thanks in advance :)

1
You could simulate this with _gaq.push(). - Seiyria

1 Answers

2
votes

Set up virtual pageviews.

In the javascript click event for the form section add (caps added for clarification):

_gaq.push(['_trackPageview', '/FORM-PAGE-OR-NAME/SECTION-NUM']);

with /FORM-PAGE-OR-NAME/SECTION-NUM being whatever you want to show up in Google Analytics and with NUM being different for each section.

The submit can also be a pageview and used as the goal destination page with the sections as the steps:

 _gaq.push(['_trackPageview', '/FORM-PAGE-OR-NAME/SUBMIT']);

You can now see in the goal funnel where people may have bailed on your form before submitting.

Identical URLs across multiple steps

However, advanced users may want to track visitors' progress through a Funnel with the same URL for each step. To do this, you need to modify your tracking code to create a virtual pageview for each step in the sequence that you want to track.

You could also use events:

_gaq.push(['_trackEvent', 'FORM-NAME', 'SECTION-NUM']);

Event Tracking

With this you could compare how many events were fired for each section.

Whether you use virtual pageviews or events will depend upon how you want to use the data in GA.