Client-Side vs Server-Side Tracking

What is the difference between server-side and client-side events? 

A client is the browser or application that your user interacts with. A client-side event usually comes in the form of a tag and is sent directly from the client to Indicative or a tag manager (like Google Tag Manager). These tags are sent when an event like page view or button click is fired.

A server-side event is an event that goes from a web server to Indicative. This includes events that are sent from the client through the web server to Indicative. This means that server-side events can mimic client-side events like page view or button click, but can also be server events like payment successful

 

When should I use client-side events?

Client-side events are an inexpensive and fast way to track. Because they are linked to the browser, client-side events are great for including information about UTM parameters, IP address and location, and device information.

Client-side events also have a few drawbacks that should be taken into consideration. The first and most common issue is cookie blockers. Client-side tracking is reliant on cookies, either first- or third-party. First-party cookies are generally reliable, since most ad blockers do not automatically stop first-party cookies. Third-party cookies, however, are often blocked leaving behind a hole in your data.  For example, Indicative’s SDK uses third-party cookies, while Snowplow’s SDK uses first-party cookies. 

Another, less common, issue is client-side events can slow down your website through asynchronous functionality and cumbersome embedded code. Most websites, however, will find that client-side tracking is not the limiting factor in the speed of their site. Please note that Indiative’s SDK does not cause this latency issues. 

 

When should I use server-side events?

 Server-side events are more flexible than client-side events, because you can introduce logic into the definition of an event. Take payment successful for example, in order to know if the payment was a success, you would need logic to check if the payment successfully went through, which can only be achieved by a server-side event. Because of this, server-side events can be enriched with user-level information like time spent on the page

Where client-side events fall short, server-side events fill the gaps. Server-side events are a reliable and secure way to track events. This makes server-side an excellent way to track revenue or other sensitive information. 

But server-side events have their pitfalls as well, primarily cost. Server-side events require manual set up, meaning they require engineering resources. The more server-side logic required, the more engineering resources you’ll need. 

 

Which type of event should I use? 

Most sources, Indicative included, recommend using BOTH server-side and client-side events to track your website. If you’re unsure when to implement each, Segment has a great flow chart to help you decide!

0 users found this helpful