Integrate Segment

We’ll assume that you already know how to add tasks to a taskflow and have added the ‘Identify a user’ Segment task to your taskflow.

Integrating Segment with Kotive happens in three steps:

  1. Connect your Segment account
  2. Setup the ‘Identify a user’ Segment task
  3. Setup the ‘Track an event’ Segment task

1. Connect your Segment account:

  1. In your taskflow in Kotive, select the Segment task and navigate to the Account details tab.

  2. Select the green button that says Connect your Segment account now.

  3. Name the account under Account label - the email address that you use for your Segment account would work well as a way to identify it.

  4. In a new tab, log into your Segment account and enter your workspace.
    • If you already have an HTTP API set up, then skip down to Step 11.
    • If you have an account, but don’t have an HTTP API set up, then click + ADD NEW and skip down to Step 8.
    • If you don’t have an account, then sign up for a Segment account and follow the steps directly below.

  5. After you’ve entered all of your details and signed up, choose Server on the next page.

  6. Next, choose Integrations or Warehouses and click Finish Setup (it doesn’t matter which option you choose - if you select Integrations you can still add Warehouses later, and vice-versa).

  7. Under Sources, click on Add Source.

  8. Scroll down the next page, to Server, and select HTTP API to install it.

  9. Click the green Connect button on the left-hand side of the page.

  10. If you want to, change the Nickname and SQL schema name. Click Create Source.

  11. Now that you’ve created an HTTP API source, you can select it to VIEW DETAILS.

  12. Copy the Write Key.

  13. Next, head back to your Kotive tab, and Paste your Write Key in the Write Key field. Click the green Save button in the bottom right-hand corner.

Your Segment account has now been connected to your taskflow.


2. Setup the 'Identify a user' Segment task:

  1. Select the Segment tab of the ‘Identify a user’ Segment task.

  2. Enter in a way of identifying the user into the USER ID field, using dynamic field tags. The user’s email address or phone number would work well for this.

Your ‘Identify a user’ Segment task has now been set up, but if you stop here, no useful data will be sent to Segment.

This is why it’s vital to add the ‘Track an event’ task in the final step.


3. Setup the 'Track an event' Segment task:

  1. After your ‘Identify a user’ Segment task, create a ‘Track an event’ Segment task.

  2. Under User ID, pull in the same information that you pulled into the User ID field in the ‘Identify a user’ Segment task.

  3. Under Event, name the action that the user performed - this could be that they completed a form, received an email, made a payment, etc.

Done! You have now fully integrated your Segment account with your Kotive taskflow. When a taskflow runs, user data will be collected and sent to all of the tools and/or data warehouses that are linked to your Segment account.

Tip

You can add conditions to your Segment tasks in the same manner as with any of the other tasks in your taskflow.