Wednesday, September 2, 2009

Tracking Forms using Google Analytics (using Goals)

I'm a huge analytics fan. I recently posted about how we helped a topical wine bar take advantage of our Forms functionality. What I hadn't mentioned is that we implemented Google Analytics to track the results. In this place I'm going to show you how, it's rattling easy, and the data you'll see crapper be extremely useful.

STEP #1 - Add the Google Analytics cipher to your Web Site HTML.

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-xxxxxxx-x");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
} catch(err) {}</script>

Notice the brave items above. They are the key to making everything work. Remember you need to make trusty the cipher on your site has the two brave lines. So pay careful attention if you already hit Google Analytics implement on your scheme site.

STEP #2 - Add the Google Analytics cipher to your Form HTML

Go to the Forms section in StreamSend and utter the "Form HTML" unification under the appropriate Form. Next utter on Edit unification for the "Subscribe" page. Add the Google Analytics cipher above right before the closing attach (all the way at the end of the form). Save your changes and you are every set.

STEP #3 - Add the Google Analytics cipher to your Form Thank You HTML

Go to the Forms section in StreamSend and utter the "Form HTML" unification under the appropriate Form. Next utter on Edit unification for the "Thank you" page. Add the Google Analytics cipher above right before the closing attach (all the way at the end of the form). Save your changes and you are every set.

Step #4 - Tag every course or email signup boxes pointing to the Form on your own site


If you are linking to the form from your scheme site, then you need to add whatever cipher so Google crapper properly associate the utter to the form.

Links:
<a href="http://app.streamsend.com/public/xxx/xxx/subscribe" onClick="pageTracker._link(this.href); return false;">Sign up</a>The brave above should be additional to your links.

Form Box:
<form name="subscribe" action="http://app.streamsend.com/public/f2gK/Gfr/subscribe" method="post" onSubmit="javascript:pageTracker._linkByPost(this)" target="_blank">
...
</form>
The brave above should be additional to your sign up box on your scheme site.

Step #5: Create a Goal in Analytics to track the signups
  • Login to Analytics and go to the Home Page.
  • Locate your scheme site's strikingness and utter the edit URL.
  • Under the "Conversion Goals and Funnel" utter on the "Edit" unification incoming to either of G1, G2, G3 or G4. (there are 4 because Google allows you to configure up to 4 goals).
  • Fill out the values as described below:
  • Active Goal : ordered to on
    Match Type: Regular Expression Match
    Goal URL: (skip this, we'll come back to this later)
    Goal Name: Create a content name you like
    * The rest you crapper leave as is...

    Now the Goal URL is based on your sign up form's URL. You crapper find the URL in the Forms section in StreamSend. It looks something same this: https://app.streamsend.com/public/f2gK/Gfr/subscribe. Notice the two brave values, they are important. The Goal URL is essentially in the following format:

    /private/VALUE1/VALUE2/.*/thank_you

    So for the example above it would be:

    /private/f2gK/Gfr/.*/thank_you
    Here is a screen shot of how the content is organized in analytics. what it would countenance same in Google Analytics.


    Step #6 - Login to Analytics and you crapper today see your form signups in reports!

    Remember it takes a couple hours before Google reports on data. So test it, and check back the incoming day to make trusty it's every employed properly.

    Hope this is helpful. In a incoming blog place I'll outline using Transactions as opposed to Goals (since with goals you are limited to 4). It's multipurpose for those that plan on using a multiple Forms.

    1 comment:

    1. The complete concept of web analytics seems to me confusing. The above posted information is helpful to me as I have understand the purpose of tracking forms.
      track forms

      ReplyDelete