Skip to content

Instantly share code, notes, and snippets.

@jmhdez
jmhdez / analytics.cs
Created March 19, 2012 09:38 — forked from gregoryyoung/analytics.cs
Usage Tracking with Google Analytics
public class TrackingService
{
// Sample usage:
// service.TrackEvent("customers/add");
// service.TrackEvent("order/discount-applied");
public void TrackEvent(string path)
{
ThreadPool.QueueUserWorkItem(x => TrackPageView("/events/" + path));
}