: Track a Goal conversion in Google Analytics for filling in a contact form when the URL stays the same If a contact form's URL stays the same after submitting the form, how can I track goal
If a contact form's URL stays the same after submitting the form, how can I track goal conversions in Google Analytics for filling in the form?
Normally I would add the confirmation page's URL into the Goal in Google Analytics, but on this particular site when submitting the form, the content dynamically changes to say "thank you", rather than a new URL loading.
More posts by @Tiffany637
3 Comments
Sorted by latest first Latest Oldest Best
You need to fire an event (or a fake pageview using trackPageview) after the form has been validated, ie when the content dynamically changes.
Do not add this code on submitting the form alone, as that will count any clicks that fail your validation.
There are two ways to do this -
Using Events in Google Analytics, and then configuring the Goal on that Event being fired.
In the form URL, add a specific URL parameter which you are sure does not do anything (yes, you read that right). Typical flow would be ... user lands on landing page, submits form, ends up on the same page (except with an additional parameter). In GA configure a funnel with the page without the parameter as the starting page, and the page with the parameter as the conversion page.
The simplest way to do this is to fire an event when the form is submitted. Then in analytics configure a goal based on the triggering of the event. (Event based goals is just another type of goal.)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.