DEV Community

Zex
Zex

Posted on • Edited on

1

Brainstorm: Some Thoughts About User Behavior Tracking

👉Remain on high level
👉No specific tools/frameworks included

Why it matters👈

  • Understand your users better
  • Narrow the gap between how you expect user to use and how user actually use it
  • Marketing data analytics

How to do it👇

On client side

  • Sync, send and wait
  • Async, send and go
  • Send in business components
  • Send in a separate service
  • Keep a local cache for unsent events for resend later
  • Local cache size limitation
  • API call timeout/failure handling

On server side

  • Log collection, centralize all log from all backend servers
  • Generate an event based on predefined event data structure on request
  • Direct to database
  • Publish over message queue

Employ a third-party service

  • Direct request
  • Integrate SDK
  • Shared database/separate database

Data definition☝️

Event

  • EventType, what happened
  • CreatedAt, when did it happen
  • Source, where did it happen
  • Payload, who/what was involved

Result

  • StatusCode
  • StatusMessage

API🌻

create

Create(Event) Result

Image of Quadratic

The best Excel alternative with Python built-in

Quadratic is the all-in-one, browser-based AI spreadsheet that goes beyond traditional formulas for powerful visualizations and fast analysis.

Try Quadratic free

Top comments (0)

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay