Anna Lewis

How To Track Contact Form Submissions Without A Confirmation Page

9th Aug 2011 Analytics 1 minute to read

SubmitSometimes web developers are unable to create a thank you or confirmation page for a form submission, this leaves you unable to easily track how many forms have been completed, as goals in Google Analytics require a URL. However, there is a nice and easy way round this. It just takes a small amount of code and you can create a pretend URL to load when the submit button is pressed.

This is done by using the Virtual Pageview method which, as you might have guessed, enables you to track a page that doesn’t actually exist. It will then appear in your content report and you can create a goal with this URL destination. An alternative would be to use Event tracking, however if you wanted this page created by web developers there is no harm in using Virtual Pageviews. If you didn’t want to have a Virtual Pageview in your content report you can always use Event tracking, details of how to do this can be found in my post about tracking clicks on a link in Google Analytics.

Here’s the code used in a typical form submission button, the second one here has the Virtual Pageview tracking code in:

<input name=”submit” type=”submit” id=”Submit” value=”Submit Form”/>

<input name=”submit” type=”submit” id=”Submit” value=”Submit Form” onClick=”_gaq.push([‘_trackPageview’, ‘/form/submit’]);”/>

So the area to customise is:

onClick=”_gaq.push([‘_trackPageview’, ‘/form/submit‘]);”

You can choose what you would like the URL to be, if you have more than one form you can name each one differently.

Once you have chosen your virtual URL and added the code within the button, the final step is to create a goal in Google Anlaytics to measure this.

Image Source

Web Submit Button via BigStock

Share this post

3 Comments

What do you think?

aspect-ratio
Kelly-Anne Crean

SEO and Internal Links: Common Mistakes to Avoid

Kelly-Anne Crean
1st Jun 2023
SEO Blog
aspect-ratio
Stacey Cavagnetto

How to Do PR for Small Businesses

Stacey Cavagnetto
25th May 2023
Digital PR Blog

Digital Ideas Monthly

Sign up now and get our free monthly email. It’s filled with our favourite pieces of the news from the industry, SEO, PPC, Social Media and more. And, don’t forget - it’s free, so why haven’t you signed up already?

Free Digital Marketing Audit

Are you a UK business that needs some expert help to uncover what’s holding your digital marketing back? Let us show you for free!

Questions?

Call us on 0330 353 0300, email info@koozai.com or fill out our Contact Form.

Map of Hampshire Digital Marketing Agency
Hampshire Digital Marketing Agency
Merlin House 4 Meteor Way Lee-on-the-Solent, PO13 9FU, UK
Map of Lancashire Digital Marketing Agency
Lancashire Digital Marketing Agency
Cotton Court Business Centre Church Street, Preston Lancashire, PR1 3BY, UK
Map of London Digital Marketing Agency
London Digital Marketing Agency
Albert House 256 - 260 Old Street London, EC1V 9DD, UK

Unlike 08 numbers, 03 numbers cost the same to call as geographic landline numbers (starting 01 and 02), even from a mobile phone. They are also normally included in your inclusive call minutes. Please note we may record some calls.

Circle Cross