Time Decay Formula for Conversion Attribution

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

Topic consumerweb

Category Data Science


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.