explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Instrument event metrics

Open markmhendrickson opened this issue 4 years ago • 6 comments

The app should trigger a "View [route]" event every time the user opens a new view with a "time to render" parameter that measures the complete paint time in milliseconds.

Additionally the app should trigger events for the following actions:

  • Start active session: When user opens any view for first time or after 4 hours since the last view open
  • Submit search query: When user submits any search query, either by hitting enter or after 3s pause after changing value
  • Select search result: When user selects search result
  • View API error (attributes: code => number, message => string)
  • Change network: When user selects network
  • Add network: When user submits new network
  • Sign in: When user authenticates successfully
  • Choose to deploy contract: When user submits contract for deployment with sandbox
  • Deployed contract: When user broadcasts transaction for contract deployment with sandbox
  • Called contract: When user calls contract with sandbox
  • Choose to send STX: When user submits send STX form with sandbox
  • Use Faucet: When user chooses to use STX faucet for testnet usage in sandbox
  • Send STX: When user broadcasts transaction for sending STX with sandbox
  • Filter transactions: When user filters transactions by criteria

All events should have these default properties:

  • Anonymous ID for user by cookie-based session
  • Authenticated (boolean): Indicating whether the user has authenticated or not upon triggering event
  • Route (string): Path of current view upon triggering event
  • UTM parameters (string): All available UTM parameters as stored in session from last availability in GET parameters
  • User agent (string)
  • Version (string)
  • Timestamp
  • Selected network (string)

markmhendrickson avatar Sep 29 '21 15:09 markmhendrickson

@markmhx are we using UTM parameters at this point? I don't think Authenticated applies to the explorer?

fbwoolf avatar Oct 08 '21 18:10 fbwoolf

I was thinking authenticated state for the sandbox specifically, though if the user is signed in there, good to know if they trigger non-sandbox events as well.

And it'd be helpful to start tracking UTM parameters as part of this so we can best learn how traffic flows between our products and via marketing campaigns we may start launching.

markmhendrickson avatar Oct 09 '21 14:10 markmhendrickson

I'm reopening since it appears we have only events network-added and network-selected integrated by the above PR and need to instrument the remaining events. The standardized naming format also needs application.

markmhendrickson avatar Nov 15 '21 11:11 markmhendrickson

I'm reopening since it appears we have only events network-added and network-selected integrated by the above PR and need to instrument the remaining events. The standardized naming format also needs application.

Yep, makes sense. I think we were just trying to get it working as a first step.

fbwoolf avatar Nov 15 '21 14:11 fbwoolf

@chresko I'll let you decide what you'd like to do with this issue, are you using the metrics we have? what else would you like to see?

andresgalante avatar Jun 19 '23 22:06 andresgalante

@andresgalante The list provided by Mark is quite exhaustive. Let's start there.

chresko avatar Jul 28 '23 13:07 chresko