3

Question:

What is the Time Decay formula that web analytics packages use to distribute credit across the multiple sessions associated with a user before a conversion?

Context:

All web analytics packages like Google Analytics rely on the concept of:

  1. USERS visitors, ie unique cookied browsers. Users have many...
  2. SESSIONS visits, ie sets of pageviews within close time proximity.
  3. CONVERSIONS a success event such as a sign-up which can occur during a session.

These analytics packages allow you to distribute the credit of a single conversion across all the preceding sessions because each played a part in leading the user to conversion. One such model is Time Decay, which gives a diminishing share of credit to sessions further from the conversion.

Time Decay Visual: (1st session) ▁ ▂ ▃ ▅ ▆ (conversion)

more info on attribution models.

Sample Data:

I am assuming the data required would be:

  • n - the total number of sessions a user has before a conversion
  • t - the total duration of time from the user's first session to conversion
  • tbc - the individual time before conversion for each session

So for three different sample users, data may look like this:

UserID n t Session# Timestamp TBC Conversion in session? User1 4 12 1 2015-10-01 12 No User1 4 12 2 2015-10-06 7 No User1 4 12 3 2015-10-11 2 No User1 4 12 4 2015-10-13 0 YES User2 3 4 1 2015-10-09 4 No User2 3 4 2 2015-10-09 4 No User2 3 4 3 2015-10-13 0 YES User3 1 0 1 2015-10-14 0 YES

Andy H.
  • 151
  • 4
  • Welcome to the site, @Andy H.! Can you provide a little more information on your question and the format of your data here? I'm not sure your question is yet understandable to someone who hasn't already been thinking about it :) – Kyle. Oct 20 '15 at 20:58
  • Thanks, @Andy H.! That's much clearer. I don't think I have the expertise to answer this, but this should help you get the help you need! – Kyle. Oct 20 '15 at 21:59
  • Thanks for sharing this post. I am using your model for the time-decay attribution modeling. Can you please tell me what is the unit for 't' and 'tbc' since both are time and the values in the data are integers. I appreciate your help. Thanks in advance. – Krish Aug 05 '16 at 03:40

1 Answers1

2

Here's one solution:

using the following data:

USER-LEVEL:

  • fss first session start (timestamp) - time of first pageview of first session for that user
  • css converting session start (timestamp) - time of the first pageview of session where user converted
  • ns number of sessions (int) - total # of sessions before conversion for user

SESSION-LEVEL:

  • ss session start (timestamp) - timestamp of first pageview in session

FORMULA: calculated for each session

  1. FOR FIRST SESSION: Attribution Credit is just linear: (or really whatever you want to make it)

    linear credit

  2. ALL OTHER SESSIONS:
    • First calculate the SUM of all session's "time before conversion":

      sum(tbc)
    • Then Calculate the credit for each session:

      sc formula

it isn't perfect because it distributes credit based on the relative position of a session in the User's lifetime. Ideally you have a preset halflife (like 7 days) so that comparison is more consistent.

Andy H.
  • 151
  • 4