Segment Integration Stepwise Guide


How to do Segment Integration with CleverTap?


Here is the Stepwise Guide on how to Integrate CleverTap with for Analytics:

When we integrate our website with Segment and CleverTap the flow looks something like:

Following are the Integration steps:

  • Go to
  • Sign Up with your credentials
  • Add Source (MyWebsite) and Destination (CleverTap)
  • To enable Source, add the below script to your website
  !function(){var||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var;e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+""+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="4.0.0";
  analytics.load(“YOUR KEY”);;
  • Paste the key that is present in the Source->Settings->API Key->Write key in place of “YOUR KEY” in the above script.
  1. To enable Destination, add the CleverTap Account ID and Token
  2. Now you will have a URL generated:
  3. In the Source page we have Debugger and Schema
    Debugger will track the events/profiles pushed and Schema will tell you the code snippet used for the same.
  4. To start a test, you can push the following code to push the profiles and the events respectively:
analytics.identify('f4ca124298', {
  name: 'Michael Bolton',
  email: ''

analytics.track('Signed Up', {
  plan: 'Enterprise'

  • Now, both profile and event pushed are visible on Segment as Segments-> Source->Debugger and in the CleverTap Dashboard under Find people and Events