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

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up