red greenThere are many good metrics that help us understand customer behavior on our websites. Conversion rate, page views per visitors, average time in website, average number of pages to purchase etc etc, and you can segment them. But sometimes they leave us hungry and unfulfilled.

I have not seen these two metrics a lot in off the shelf packages but I like them a lot because they can be deeply insightful about customer behavior, specifically in context of an outcome.  The metrics are “Days to Purchase” & “Visits to Purchase”. I am sure you've seen them used before, if you have not read on.

(I am using the term purchase here but there is nothing unique about ecommerce, you can use these metrics if your site exists to gather leads or get people to download pdf’s or for tech support. All that is required is a robust understanding at your end of what the “outcome” is on your website.)

Most of the current crop of web analytics metrics (KPI’s if you will) are very much session based. Not all but most of them. The “limitation” of session based metrics is that it presumes a “closure” in one session (one visit if you will). That is usually not the case. Customers visit your website, come back more times, depending on why you exist, and then maybe close the deal (buy, give a lead, get an answer, send your CEO a nasty email about how dysfunctional your website is).

These two metrics are “pan-session” metrics and since they accommodate for how customers really use most website they can be deeply insightful.

Ok enough teasing, here are the specifics (though I have to admit I am much better at this topic in front of a white board than a blog post, I ask for your patience because this is a bit complex)…..


  • Your website uses some kind of “sessionization” methodology. For the most part, regardless of if you use weblogs or javascript tags to collect data sessionization happens using cookies. Either via your web analytics tool or your web server platform. Both are fine.
  • Your website sets both transient session cookies and persistent 100% anonymous “user_id” cookies.
  • Like anything that relies on cookies it is optimal if you are on first party cookies to improve quality (it won’t eliminate error, just reduce it). [PS: If you are not on first party cookies I strongly recommend that you badger your analytics provider to switch you to first party asap, all the big boys/girls support first party cookies.]


  • Avg Visits to Purchase: Average number of sessions from first website interaction to Purchase.
  • Avg Days to Purchase: Average number of days from first website interaction to Purchase.

Why should you measure these kpi’s?

Most often what is lost in all our analysis is the fact that there are many different interactions for someone before they purchase. People come, they see, they come back, they see something else, they go read amazon reviews, they do price comparison and then for some weird reason even though you sell at a really high price they come buy from you.

Session based metrics (say all the off the shelf path analysis reports you see in your web analytics tools on the market today) don’t really illustrate this.

So as you run your affiliate marketing campaigns or your PPC campaigns or direct marketing efforts, what is the value of the first visit by a customer and should you pay more to get customers into the door because they have longevity?

One simple reason to measure these kpi’s is to get a true understanding of “how long” it takes people to buy from your website and is that behavior different across different segments of your website customers. If there is, you can exploit this knowledge to optimize your campaigns, promotions, other efforts to get the best bang for the buck.

How do you measure these kpi’s?

The analytics tools at our disposal simply don’t allow for this kind of sophistication in analysis so we use our data warehouse that contains all our aggregated clickstream and outcomes data. Perhaps your web analytics tool could allow you to do this (if so please do share via comments). We run SQL queries and here is the “query” in english:

  1. Gather all the sessions for the last x amount of time (six months in our case, hence millions of rows, use oracle)
  2. For each session the data you will bring in will depend on your website, I recommend: all cookie values, campaign values, pages.
  3. Organize the sessions by their persistent “user_id” cookie value (often sites use shopper_id as a persistent cookie, just ask your web guys what the name of the cookie is, I am sure you have one)
  4. For each “set”, as in #3, look for the session with presence of your “thank_you” (purchase) page.
  5. For the first metric Visits to Purchase:
    1. Take all the persistent cookie user_id’s for all those who purchased in a given month (say July 2006)
    2. Look back in the data (six months in the above case) to find their first visit
    3. Count of Sessions in the “set” between first visit and purchase visit
  6. For the second metric Days to Purchase
    1. Take all the persistent cookie user_id’s for all those who purchased in a given month (say July 2006)
    2. Look back in the data to find their first visit
    3. Count of Days in the “set” between first visit and purchase visit
  7. Done, get a glass of champagne, you deserve it

What do you do next?

Now you have overall metrics that look something like this (all numbers obviously not real and your numbers will look different):

days to purchase


visits to purchase

This in of itself is really valuable. If this data were real and for your website it would be thrilling to know that a full 81% of people convert in three sessions or less and most of them (62%) on the same day (!!). If you are the half empty kind of gal/guy, it is rather depressing that you are essentially getting just a couple of shots, in just one single day, to convert someone to a purchaser. The chances someone will buy go down dramatically after day zero (the first visit day).

You can obviously make the groupings of visits and days that make the most sense for your business.

What is even more valuable is to segment this data (is that not a good idea all the time!! : )). 

You do the simple one first. Segment by month and get a trend of the data. Are you getting better or worse over time? Is there a seasonality impact of these numbers (so in the dull month of July if people take their own sweet time, rather than valentine's day then you can do different things on your site)?

My standardize advice after that: segment by your core acquisition strategies (examples: affiliate marketing, “direct” traffic, PPC, SEO, referrers from blogs etc). You are going to get a Real understanding of customer behavior because most likely you’ll see something like this:

visits2pur segmentation

Wasn't that a lot of fun? Only to a geek like me you say? I’ll take that. : )

What actions can I take from these Insights?

As you begin to understand pan-session customer behavior you are actually getting into things beyond the surface, things that most web analytics tools don’t provide. This also means that if you get this far, you can develop an understanding that can be a true competitive advantage for you because this is hard to do, even for your competitors.

Actions you can take from these kpi’s could be:

  • Optimize spending on key phrases for ppc campaigns, especially as you bid for “category” terms (with category terms you are betting on getting on the radar “early”, compared to brand key phrases, and if the number of sessions is small from above analysis that would be rather depressing, so put less value on category key phrases – this is a completely hypothetical example).
  • Optimize your website content and structure for different segments. Clearly if I came to you and said you get one session to convince me to buy or I am out, would your website be the same? Probably not, you would throw away all the “extra” content and focus on the most powerful. Alternatively if the data indicated the purchase behavior was long stretched out over days/visits, you could / should provide more content since visitors seem to want more.
  • Optimize “interruptives”. This is very cool, if your web platform allows it. If you know the point of “bailing” (say third session) for your customers, you could attempt to offer up a goodie in the fourth session or based on what they have seen so far show them something more relevant (this is your last chance) or ask for an email address for a future deal or whatever.
  • Other smarter things you can think of but are failing me right now.

Ok so what do you think? Sounds interesting? Are you totally confused? Are you already using these metrics as standard operating procedure? Don’t agree with something above? Please share your feedback via comments.

[Like this post? For more posts like this please click here.]

Social Bookmarks:

  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite
  • services sprite