Skip to main content
Gainsight Inc.

Segment.com Server-side Integration

ATTENTION: Documentation Updates are in Process
We are in the process of updating the screenshots, GIFs, and content to match the latest UX based on the Horizon Experience’s new look and feel. To learn more about the Horizon Experience in Gainsight PX, click here.

Gainsight PX now supports Segment’s server-side integration. Why are we excited and how is that different than our current Segment integration? The answer is simple: Server-side integration allows you to easily track additional data without the need to expose the data to the front-end layer. This means you can track more with less effort and without having that data flow through your client’s browser.

The types of data you can track are unlimited and can rely on your server’s endpoint validation. For example - on the server-side, you can track events that passed the basic user input validation like login or any relevant forms submitted by the users. You can also track tenant-level data, like tenant settings.

Setting up Segment.com server-side integration with Gainsight PX

pasted image 0.png

Tracking user transactions

SaaS platforms today are built using micro-services as part of implementing a service-oriented architecture. While being a highly scalable architecture, it is also known to be more challenging to track user transactions that tend to be distributed between different services. Server-side tracking enables the tracking code to correlate the user activity across services which can be used to measure things like API usage, SLA and performance.

pasted image 0-1.png

Server-side code example

analytics.enqueue(TrackMessage.builder("Item Purchased")
    .userId("f4ca124298")
    .properties(ImmutableMap.builder()
        .put("revenue", 39.95)
        .put("shipping", "2-day")
        .build()
    )
);
  • Was this article helpful?