Digestly

Dec 10, 2024

Client- and server-side tracking with Klaviyo APIs

Klaviyo - Client- and server-side tracking with Klaviyo APIs

The video provides a comprehensive guide on choosing between client-side and server-side Klaviyo API endpoints. Client-side APIs are used to capture user behavior data directly from the user's device, such as website browsing and form submissions. An example given is Beantown Coffee tracking customer views on their coffee samples page using client-side APIs, which is suitable for non-sensitive data. Client-side requests are authenticated with a public API key, which is safe for frontend code as it cannot retrieve sensitive information. Server-side APIs, on the other hand, are handled on the server, making them more secure for transmitting sensitive information like addresses and phone numbers. Beantown Coffee uses server-side APIs to securely track seminar registrations, authenticated with a private API key. The video emphasizes that server-side calls are ideal for sensitive or bulk data handling, while client-side calls are best for immediate, user-driven data.

Key Points:

  • Client-side APIs capture user behavior data directly from the user's device and are suitable for non-sensitive data.
  • Server-side APIs are more secure and suitable for handling sensitive information, such as personal data.
  • Client-side requests use a public API key, which is safe for frontend code, while server-side requests use a private API key.
  • Client-side is ideal for immediate, user-driven data, while server-side is best for sensitive or bulk data handling.
  • Practical examples include Beantown Coffee using client-side APIs for tracking page views and server-side APIs for seminar registrations.
View Full Content
Upgrade to Plus to unlock complete episodes, key insights, and in-depth analysis
Starting at $5/month. Cancel anytime.