How Do I Switchover From Segment?

The Freshpaint Javascript SDK is 100% compatible with the Segment SDK. That means you can switchover with doing a minimal amount of work. All your event tracking will automatically be switched over to Freshpaint. Switching from Segment to Freshpaint takes only two steps:

  1. Setup your destinations in Freshpaint.

  2. Replace the Segment SDK with the Freshpaint SDK.

1. Setting up Your Destinations

For each each destination you have in Segment, setup the corresponding destination in Freshpaint. This can be done in the Freshpaint destinations page. For each destination, you only need to copy your API key into Freshpaint.

You can override your destinations hardcoded into your Segment tracking code. This can be done in the Freshpaint Event Schema, and clicking on the Advanced Settings for a particular event's Destinations.

2. Replacing the Segment SDK with the Freshpaint SDK

First remove the Segment install snippet and replace it with the Freshpaint one. You can retrieve the Freshpaint installation snippet in the Freshpaint sources page.

With that done, you need to point your Segment tracking code to Freshpaint. This can be done by setting the analytics object to the freshpaint object:

window.analytics = freshpaint;

Congrats! You're Done!

After replacing the Segment SDK with the Freshpaint SDK, you've finished the switchover process. You may not believe it, but that's all there is to it! If you want to double check everything is working properly, try performing an action that would normally trigger an event in Segment. You should see that event show up in the Freshpaint Liveview and in all your destinations too!