Skip to Content
First- and Last-Touch Attribution
Last Touch Example

Two days later, runs an ad on June’s Facebook page. June remembers how much she wanted that Ninja Turtles t-shirt, and follows the ad back to

She now has the following rows in page_visits table:

user_id timestamp page_name utm_source
10069 2018-01-02 23:14:01 1 - landing_page buzzfeed
10069 2018-01-02 23:14:01 2 - shopping_cart buzzfeed
10069 2018-01-04 08:12:01 3 - checkout facebook
10069 2018-01-04 08:13:01 4 - purchase facebook

  • June’s last touch — the exposure to that led to a purchase — is attributed to facebook
  • She visited the checkout page at 08:12:01 and the purchase page at 08:13:01



Find all of of June’s rows, using a WHERE clause with just user_id.

Folder Icon

Sign up to start coding

Already have an account?