Google Analytics ASP.Net Web Control
Update 2007-11-09: I've set this up as a Google Code project, there'll be more features to come.
Google Analytics is an amazingly powerful tool, we don't build a site without it these days. In its simplest form it's not much more than a fancy looking version of your usual web server stats. When used properly though it does so much more than show you how many hits you've had, it will tell you how hard your site is working to make you money. It will show you exactly where your online marketing spend is going.
A lot of the really good stuff means fiddling around with JavaScript and some stuff isn't even in the API, like setting a campaign source from the server (without using the querystring)
So here is a handy a little web control that makes it all much easier. GAControl.zip
How to use it
Place an instance of the control in your head tag, this can be on a master page. Set the account Id property, you'll find it in the tracker code.
In the master page code file you can make it a public property.
You can then use it from any control or page to do things like add page hits for goal tracking.
Set a campaign source
Add other domains to be tracked in the same account. All links and forms going to that domain will pass the cookie across, so long as the other site is tracking with the same GA account the user session will carry across.
You can also save the details of e-commerce transactions for accurate ROI reporting.
And a few other things! Give it a go and let me know what you think.
Labels: asp.net, google analytics, webcontrol


follow me on Twitter!
RSS Feed
