Skip to content

Instantly share code, notes, and snippets.

@Dwite
Created January 15, 2026 15:45
Show Gist options
  • Select an option

  • Save Dwite/2db5bade0f6699797bc18da0511e1db8 to your computer and use it in GitHub Desktop.

Select an option

Save Dwite/2db5bade0f6699797bc18da0511e1db8 to your computer and use it in GitHub Desktop.
P2P Seller Funnel Analytics - KPI Event Specification for Snowplow (Android & iOS)

P2P Seller Funnel Analytics - KPI Event Specification

Overview

This document provides the exact Snowplow event specifications for P2P seller funnel KPIs on both Android and iOS platforms. Both platforms use shared KMM analytics code, ensuring consistent event tracking.


Critical Note: Page Type Schema Limitation

Due to Snowplow schema limitations (iglu:com.thredup/page_entity/jsonschema/1-2-4), most P2P page types are mapped to peer-to-peer-dashboard:

Logical Page Type Actual Snowplow Value
peer-to-peer-create-listing peer-to-peer-create-listing
peer-to-peer-dashboard peer-to-peer-dashboard
peer-to-peer-listings peer-to-peer-dashboard ⚠️
peer-to-peer-sale-details peer-to-peer-dashboard ⚠️
peer-to-peer-bags peer-to-peer-dashboard ⚠️
peer-to-peer-landing peer-to-peer-dashboard ⚠️
peer-to-peer-disputes peer-to-peer-dashboard ⚠️
peer-to-peer-stats peer-to-peer-dashboard ⚠️

Recommendation: Always filter by category in addition to page_type for accurate results.


Critical Note: Page Visit Tracking Gap

P2P screens do NOT track automatic screen view events. The KMM P2P module only tracks interaction events (clicks, submits, etc.), not page views.

  • Native Android fragments track ScreenView events automatically
  • P2P KMM screens are hosted in SharedFragment with pageType = OTHER
  • No trackScreenView() methods exist in P2P analytics classes

Impact: "Page Visits" KPIs require proxy queries using interaction events.


KPI Event Specifications

1. List p2p Item Page Visits

Field Value
Status ⚠️ NOT DIRECTLY TRACKED
Proxy Query Any interaction in create listing flow
-- Proxy: Count sessions with any create listing interaction
SELECT COUNT(DISTINCT session_id)
WHERE category IN (
    'peer-to-peer-photo-guide',
    'peer-to-peer-camera',
    'peer-to-peer-photos-review',
    'peer-to-peer-condition',
    'peer-to-peer-attributes',
    'peer-to-peer-pricing',
    'peer-to-peer-listing-review'
)

2. Photo Added

Field Value
action click
category peer-to-peer-camera
label use-photo
page_type peer-to-peer-create-listing

Notes:

  • use-photo is the final confirmation when a photo is saved to the listing
  • Covers both camera-taken and gallery-selected photos (both go through review)
  • For gallery multi-select that bypasses review, also count select-from-gallery

Related Events (photo capture flow):

Event label Description
Camera shutter (guided) photo-taken Shutter pressed in guided camera flow
Camera shutter (single) single-photo-taken Shutter pressed in single photo mode
Gallery picker opened select-from-gallery User opens gallery picker
Photo confirmed use-photo User confirms photo → saved to listing
-- Recommended query for Photo Added
WHERE category = 'peer-to-peer-camera'
  AND label = 'use-photo'

3. Photo Review Completed

Field Value
action click
category peer-to-peer-photos-review
label continue
page_type peer-to-peer-create-listing
WHERE category = 'peer-to-peer-photos-review'
  AND label = 'continue'

4. Condition Completed

Field Value
action click
category peer-to-peer-condition
label continue
page_type peer-to-peer-create-listing
WHERE category = 'peer-to-peer-condition'
  AND label = 'continue'

5. Add Details Completed

Field Value
action click
category peer-to-peer-attributes
label proceed-next
page_type peer-to-peer-create-listing
WHERE category = 'peer-to-peer-attributes'
  AND label = 'proceed-next'

6. Pricing Completed

Field Value
action click
category peer-to-peer-pricing
label next
page_type peer-to-peer-create-listing
WHERE category = 'peer-to-peer-pricing'
  AND label = 'next'

7. Draft Saved

Field Value
action click
category Multiple (see below)
label save-draft
page_type peer-to-peer-create-listing

Save points exist at multiple steps:

Category Screen
peer-to-peer-condition Condition step
peer-to-peer-attributes Details/Attributes step
peer-to-peer-pricing Pricing step
peer-to-peer-listing-review Final review step
-- All draft saves
WHERE label = 'save-draft'
  AND category IN (
      'peer-to-peer-condition',
      'peer-to-peer-attributes',
      'peer-to-peer-pricing',
      'peer-to-peer-listing-review'
  )

8. Item Published

Items can be published from two different places:

8a. First-time Publish (Create Listing Flow)

Field Value
action submit
category peer-to-peer-listing-review
label publish
page_type peer-to-peer-create-listing

8b. Re-publish (Listing Details Page)

Field Value
action submit
category peer-to-peer-listing-details
label publish-listing
page_type peer-to-peer-dashboard ⚠️
-- All published items (both new and re-published)
WHERE action = 'submit'
  AND (
      (category = 'peer-to-peer-listing-review' AND label = 'publish')
      OR
      (category = 'peer-to-peer-listing-details' AND label = 'publish-listing')
  )

-- NEW listing publish only (for publish rate calculation)
WHERE action = 'submit'
  AND category = 'peer-to-peer-listing-review'
  AND label = 'publish'

9. Item Publish Rate

Metric Formula
Item Publish Rate (Item Published events) / (List p2p Item Page Visits)

Note: Since page visits aren't directly tracked, use proxy queries or calculate at user/session level.


10. Item Edits

Items can be edited from two places:

Source category label property
Listings List peer-to-peer-listings edit-item item_id={uuid}
Listing Details peer-to-peer-listing-details edit-listing -
-- All item edit clicks
WHERE (category = 'peer-to-peer-listings' AND label = 'edit-item')
   OR (category = 'peer-to-peer-listing-details' AND label = 'edit-listing')

11. Price Adjustments

Price can be edited from four different places:

Source category label Context
Listings List peer-to-peer-listings edit-price Quick edit from list (includes item_id property)
Listing Details peer-to-peer-listing-details edit-price Edit from item detail page
Create Listing (Pricing) peer-to-peer-pricing edit-price During initial listing creation
Create Listing (Review) peer-to-peer-listing-review edit-price Editing price before first publish
-- Price adjustments on existing items only (drafts + published)
WHERE label = 'edit-price'
  AND category IN ('peer-to-peer-listings', 'peer-to-peer-listing-details')

-- All price edit clicks including during creation
WHERE label = 'edit-price'
  AND category LIKE 'peer-to-peer%'

Note: The actual price change is tracked via:

  • label = 'save-price'
  • category = 'peer-to-peer-pricing'
  • property = 'price_cents' with the new price value

12. p2p Dashboard Page Visits

Field Value
Status ⚠️ NOT DIRECTLY TRACKED
Proxy Query Any interaction on dashboard
-- Proxy: Count sessions with any dashboard interaction
SELECT COUNT(DISTINCT session_id)
WHERE category = 'peer-to-peer-dashboard'

Summary Reference Table

KPI action category label page_type (actual)
List p2p Item Page Visits ⚠️ N/A Use proxy query - -
Photo Added click peer-to-peer-camera use-photo peer-to-peer-create-listing
Photo Review Completed click peer-to-peer-photos-review continue peer-to-peer-create-listing
Condition Completed click peer-to-peer-condition continue peer-to-peer-create-listing
Add Details Completed click peer-to-peer-attributes proceed-next peer-to-peer-create-listing
Pricing Completed click peer-to-peer-pricing next peer-to-peer-create-listing
Draft Saved click peer-to-peer-* save-draft peer-to-peer-create-listing
Item Published (New) submit peer-to-peer-listing-review publish peer-to-peer-create-listing
Item Published (Re-publish) submit peer-to-peer-listing-details publish-listing peer-to-peer-dashboard
Item Edits click peer-to-peer-listings / peer-to-peer-listing-details edit-item / edit-listing peer-to-peer-dashboard
Price Adjustments click Multiple (see above) edit-price Varies
p2p Dashboard Page Visits ⚠️ N/A Use proxy query - -

Code References

Android

  • Page Type Enum: thredUP/src/main/java/com/thredup/android/core/analytics/snowplow/entity/PageEntity.kt:81-88
  • P2P Analytics: p2p/src/commonMain/kotlin/com/thredup/p2p/analytics/screen/
  • Snowplow Tracker: thredUP/src/main/java/com/thredup/android/feature/p2p/analytics/SnowplowTrackerImpl.kt
  • SharedFragment (P2P host): thredUP/src/main/java/com/thredup/android/feature/shared/ui/SharedFragment.kt:60

iOS

  • Page Type Enum: iOS-Boutique/Analytics/SnowPlow/Enums/SPPagetype.swift:149-165
  • Snowplow Tracker: iOS-Boutique/KMM/SharedSnowPlowTracker.swift

Shared KMM

  • Analytics Events Doc: p2p/src/commonMain/kotlin/com/thredup/p2p/analytics/ANALYTICS_EVENTS.md
  • Page Type Definition: p2p/src/commonMain/kotlin/com/thredup/p2p/analytics/model/AnalyticsEvent.kt:57-67

Recommendations

  1. Update Snowplow Schema: Add missing page types (peer-to-peer-listings, peer-to-peer-sale-details, etc.) to enable accurate page_type filtering

  2. Add Screen View Tracking: Implement trackScreenView() methods in P2P analytics classes to properly track page visits:

    fun trackPhotoGuideScreenView() =
        track(AnalyticsAction.ViewContent, CATEGORY_PHOTO_GUIDE, "screen-view")
  3. Use Category for Filtering: Until schema is updated, always filter by category rather than relying solely on page_type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment