Hi Mike, thanks for replying.
Crash course into Analytics: using a .js from their servers they track usage of the site ( source of visit, pages viewed, time on site etc ). That’s default after installing their script.
So _gaq.push() – a bit about the benefits: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
TL;DR version: When then user does something, especially click a link or submit a form, Google Analytics will track this.
Of course, clicking a link can be tracked with referral, so why does this count for anything?
We all have some actions in the site that have greater value to us. For some it may be playing a video or submitting a form.
In my case, it’s the form.
So, you have <form action="php stuff">some html stuff</form>
. This basic form will get your info somewhere. But if you want to track the source of the action ( like the landing page, previous page, visit source ) you’ll need to add aditional info.
You do that by placing onsubmit="_gaq.push(['_trackEvent', 'Contact', 'SubmitForm', 'Contacts']);"
before closing the <form tag
So, while having <form action="https://mywebsite.com/contact#FSContact1" id="si_contact_form5" method="post">
you add the previously mentioned code to track it in Google Analytics.
My desired example code would be:
<form action="https://mywebsite.com/contact#FSContact1" id="si_contact_form5" onsubmit="_gaq.push(['_trackEvent', 'Contact', 'SubmitForm', 'Contacts']);" method="post">
Another option would be adding this with onclick=""
on the Submit button, but that would get some false positives since not all clicks get past validation.
If you decide to get this into the plugin I can help with the testing.
Nice plugin BTW, works great for my dev, will rate it after it’s live.
Hope I made it clearer now.