We’ll assume that you already know how to add tasks to a workflow and have added the ‘Identify a user’ Segment task to your workflow.
Integrating Segment with Kotive happens in three steps:
- Connect your Segment account
- Setup the ‘Identify a user’ Segment task
- Setup the ‘Track an event’ Segment task
1. Connect your Segment account:
In your workflow in Kotive, select the Segment task and navigate to the Account details tab.
Select the green button that says Connect your Segment account now.
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.
- 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.
After you’ve entered all of your details and signed up, choose Server on the next page.
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).
Under Sources, click on Add Source.
Scroll down the next page, to Server, and select HTTP API to install it.
Click the green Connect button on the left-hand side of the page.
If you want to, change the Nickname and SQL schema name. Click Create Source.
Now that you’ve created an HTTP API source, you can select it to VIEW DETAILS.
Copy the Write Key.
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 workflow.
2. Setup the 'Identify a user' Segment task:
Select the Segment tab of the ‘Identify a user’ Segment task.
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:
After your ‘Identify a user’ Segment task, create a ‘Track an event’ Segment task.
Under User ID, pull in the same information that you pulled into the User ID field in the ‘Identify a user’ Segment task.
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 workflow. When a workflow runs, user data will be collected and sent to all of the tools and/or data warehouses that are linked to your Segment account.
You can add conditions to your Segment tasks in the same manner as with any of the other tasks in your workflow.