1

I am facing difficulty to understand how segment.io works.

Segment has explained that all data is sent to them (segment servers) and then it will be routed to destinations.

From https://segment.com/docs/guides/general/what-is-segment/

You just send your data to us, then we translate and route it to all of your tools

But when I checked the one of the open sourced integration with CleverTap, It looks like the mobile application is sending the events to CleverTap directly, without going through Segment Servers. Here are code snippets.

https://github.com/CleverTap/clevertap-segment-android/blob/master/src/main/java/com/segment/analytics/android/integrations/clevertap/CleverTapIntegration.java

cl.pushEvent(event, properties);

Here cl is CleverTap API, which is also opensourced at

https://github.com/CleverTap/clevertap-android-sdk/blob/master/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java

Here eventually the pushed events are batched and send to Clevertap server.

https://github.com/CleverTap/clevertap-android-sdk/blob/master/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L2207

So, is there any role of Segment servers in this process or not at all? If segment servers are not involved then I guess the more integrations you add the more of your users internet data will be consumed. Is this right?

dnsh
  • 3,516
  • 2
  • 22
  • 47

1 Answers1

1

If you are using a bundled SDK like the CleverTap Segment SDK, then data is tracked by Segment and CleverTap. You can see in CleverTapIntegration.java that Segment methods are overriden. If you call any Segment function like identify() then internally data is also sent to CleverTap.

Community
  • 1
  • 1
Darshan Pania
  • 1,374
  • 13
  • 20
  • I am confused. Why CleverTap needs integration with Segment then? If CleverTap is going to get events directly from Mobile App then, doesn't it defeats the whole purpose of Segment? – dnsh Nov 27 '19 at 13:53
  • Some apps do use both Segment and CleverTap, the bundled SDK mentioned above helps in that case. – Darshan Pania Nov 28 '19 at 09:38