Google Analytics in NetCommunity Demystified

A Little Background

Why do I need to web analytics?

Trying to run a successful web site without analytics is like writing a novel by putting alphabet soup in a blender. You know what’s going in, but have no way to control what’s coming out. I believe that good, actionable web analytics are as important as your marketing copy and site design, and represent the biggest opportunity to make money and generate leads online. Web analytics help you turn an opaque and faceless stream of online visitors into a fascinating source of insight and action.

Why Google Analytics (GA)?

GA is powerful, free, constantly adding new features, and supported by a large, stable company. It integrates well with Google AdWords for organizations who are interested in running a online ad campaign. NetCommunity’s analytics integration has been designed with GA in mind. It will work with most any analytics solution, but going forward NetCommunity will include more and more first-class hooks into Google Analytics.

            How does GA track my site?

After signing up for GA, you are given a piece of Javascript code and told to put it on every page of your site. The script runs every time someone views a page, and sends Google information about that visitor like:
                - How did this person get to your site?
                - Where is the visitor, geographically?
                - What URL is the visitor looking at? (n.b. this makes the URL very important)
Based on just that information you can learn an incredible amount about how your site is performing and what your visitors are doing.

Setting up Google Analytics in NetCommunity

Signing up

Go to http://www.google.com/analytics and sign up for an account (it’s painless, I promise). When you finish the sign-up you will be presented with your tracking script. Save it somewhere (though you can always find it again on the GA site).

Configuring GA

Go to the home page of Google Analytics and edit the profile settings for the account you just created. Hit “Edit” on the top left of the “Main Website Profile Information” box. You can leave “Default page” blank because NetCommunity always serves up a page URL. I suggest putting “bm, erid, frsid” into the “Exclude URL Query Parameters” box.  Finally, use the settings below to track site search:
 
           

This will let you see what your users are searching for inside NetCommunity. It will pick up queries from both the Search Part and the Quicksearch Part.

Configuring NetCommunity

Go the Administration->System Options, and scroll down to “Enable Site Tracking”. Check the box and copy-paste the code GA gave you into the site tracking script box. Now, we have some slightly different instructions depending on which version of NetCommunity you are using:

                 5.6 – You’re done!

                6.10 – Near the end of the code Google provided there is this line:
                                                pageTracker._trackPageview();
                                Change it to:
                                                pageTracker._trackPageview(BBNCAnalyticsURL);

Save.

Whoa, whoa, whoa, what was that? Why are things different between the two versions? Good question! Allow me to digress into a…

Soul-Crushing Technical Discussion (TM)

GA tracks visitors by examining the URLs a person visits while on your site. This can cause a bit of confusion is complex web applications. Here’s an example - let’s say you have a donation form at URL http://MyOrg.com/page.aspx?pid=100. When a visitor makes a donation and sees the confirmation screen, the URL doesn’t change. GA has no way to distinguish between users who actually donated and users who just viewed the donation form and then did something else. That’s a pretty big problem! How can you measure the effectiveness of your site if you can’t even track how many people donated? Similar problems exist for the Event Registration Form and the Membership Form.

NetCommunity’s solution is to build up a special URL for consumption by GA. This URL has extra analytics goodness on it to help you make sense of your data. For example when someone views that donation form, the URL that gets sent to GA looks like:

Page.aspx?DonationStep_51=DonationStep_Checkout&pagename=Donate&pid=100

And when a visitor completes a donation the URL looks like this:

Page.aspx?DonationStep_51=DonationStep_Acknowledgement&pagename=Donate&pid=100

Voilà! You can distinguish between people who did and did not donate. There is some extra information in there as well, like the part ID # of the donation form (51) and a human-readable page name. Any information that was originally present on the URL is also sent over.

What changed between version 5.6 and version 6.10 is how NetCommunity sends this special URL to the analytics service. In 5.6 NetCommunity built an invisible iFrame on each page containing your tracking code and pointed the iFrame to the special URL. The tracking code would see the URL of the iFrame and send it over to GA. This worked ok, except for one major problem – GA lost all referrer information. If someone clicked through to your site from a blog, there was no way to know because the tracking script got loaded in an iFrame which always had a URL referrer of the host NetCommunity page. Referrer information is extremely important when analyzing traffic because it allows you to place value on you marketing, PR, and advertising efforts.

In version 6.10, NetCommunity eliminated the iFrame and put the tracking code into the main page. NetCommunity then writes a Javascript variable called “BBNCAnalyticsURL” to every page. You can tell the GA code to use a URL other than the one in the address bar by passing the new URL into the trackPageView() method as instructed for 6.10 users above. Now we have the best of both worlds. The tracking code is running in the correct page, we get extra information on the URL, and we have our referrers intact.

Looking at the Data

Setting up Goals in GA

Tracking conversions in GA is done by setting up Goals. Goals are triggered when someone completes an action on your site. I’ll quickly show you how to set up a goal for a completed donation. You can set up different goals of your own, and with some clever Javascript you can even track things that NetCommunity doesn’t build into its special URL by modifying the BBNCAnalyticsURL variable.

To set up a simple donation goal, first edit your analytics profile and edit the first goal in the “Conversion Goals and Funnel” box. Set up the goal like this:
 
            


All BBNC donation confirmation pages will contain the value “DonationStep_Acknowledgement” and by using the Regular Expression Match Type, any URLs that contain that value will count as a completed goal. You can look through the NetCommunity documentation to see how the URLs are built for different part types.

Where to go from here

Digging deep into GA and generating actionable metrics is well beyond the scope of this document, but here are a few resources to get you started:

1.       Avinash Kaushik’s Blog – Avinash is one of the real analytics gurus out there and has a great archive of blog posts explaining the ins and outs of web analysis.

2.       CopyBlogger – Fantastic advice for converting traffic, optimizing landing pages, and writing copy that generates results.

3.       Conversion Room – Tips for conversion written by the Google Analytics team.

4.       Conversion University – A thorough nuts & bolts guide to GA written by the Google team.

5.       Practical eCommerce – Blogs and articles to help get value from your visitors. Many articles are applicable to nonprofits as well as ecommerce sites.

Up Next

          eCommerce in GA

I’m going to write another article showing you how to set up the eCommerce features of GA and integrate them into NetCommunity. Even if you aren’t selling anything or soliciting donations the ecommerce reports in GA can be powerful tools.

Testing Your Content

I’m going to dig into the Content Comparison part and show you how simple tests can make a big difference in your online revenue. I’ll also look at the testing functionality built into GA.