DEV Community


Brainstorm: Some Thoughts About User Behavior Tracking

Speak C++/Python/Go/TS, love to make things happen and help people make their things happen :)
Updated on ・1 min read

👉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☝️


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


  • StatusCode
  • StatusMessage



Create(Event) Result

Discussion (0)

Forem Open with the Forem app