5 min read

Announcing Kevel's Segment Integration

Justin Niessner
Justin Niessner
Updated on
April 12, 2021
Product

Kevel is excited to announce our new integration with Segment, one of the leading customer data platforms. Our new integration allows you to leverage the first-party customer data you have in Segment to create user-targeted ads within Kevel.

Benefits

Customer data platforms (CDPs) are extremely powerful tools. They allow you to aggregate your customer data from multiple sources in a single place, and, in the case of Segment, they allow you to send that data into downstream tools.

This enables some interesting possibilities. You can do everything from send event data into AWS Kineses Firehose to create a data analytics warehouse for your customer data to enabling your support and customer acquisition teams with more detailed customer data in the tools that they're familiar with.

Segment also offers Personas, which allow you to use your data to build Computed Traits and Audiences.

With the Segment/Kevel partnership, you can now push these Segment Personas directly into Kevel's Data Management Platform (UserDB). This enables you to do user-level targeting, such as showing ads just to users tagged as a specific Persona.

Installation

From your Segment account, search for Kevel's Destination Integration and click "Configure Kevel".

Kevel's listing in Segment's Destination Catalog

Next, you'll need to configure your Segment Sources for the Kevel Destination. Once you select a Source, it's time to configure your credentials. You should see an interface similar to this:

Kevel Credentials configuration in Segment

To get your API Key, log in to the Kevel app and navigate to ""Settings" -> "API Keys"" via the top navigation. You'll see all your API Keys listed there.

You can find your Network ID using the ""Information"" bubble next to your username in the top right corner of the Kevel app.

Kevel Information Popover

After entering your credentials, configuration is done! The only thing left is to watch your first-party customer data flow into Kevel's UserDB.

Usage

You'll probably want to verify that the integration is working.

When user data is sent into Kevel's UserDB, we use Segment's "userId" as the UserDB "userKey". To test if this is working, first query UserDB via the API for a user's record:


"""bash NETWORK_ID=xxx SEGMENT_USER_ID=xxx curl "https://e-$NETWORK_ID.adzerk.net/udb/$NETWORK_ID/read?userKey=$SEGMENT_USER_ID """
	

If all is working, you should get back a UserDB record with any boolean Traits stored as Interests and everything else stored as Custom Properties:


"""json { "key": "testnewuser2", "interests": [ "frequent_fliers" ], "custom": { "favoriteAirline": "southwest" } } """

Now that you've verified that data is successfully flowing into Kevel, you're ready to target users based on your data.

This can be done via either the Kevel app or Kevel's APIs. For this example, we'll use the JavaScript Management SDK (which can be installed from "npm" by running "npm install @adzerk/management-sdk").

The following snippet will create a flight targeting the sample user from earlier:


"""js let Adzerk = require("@adzerk/management-sdk"); let specificationList = Adzerk.buildFullSpecificationList();(async () => { let specifications = await Adzerk.fetchSpecifications(specificationList); let client = await Adzerk.buildClient({ apiKey: "*****", specifications });let flight = await client.run('flight', 'create', { campaignId: 1234, priorityId: 1234, name: 'Frequent Fliers who prefer Southwest', startDateIso: new Date(Date()), goalType: 1, customTargeting: '$user.custom.favoriteAirline = "southwest" and $user.interests CONTAINS "frequent_fliers"', }); })(); """

You're now ready to request Decisions from Kevel with your custom user targeting. The only thing needed is to properly set the user key on the request:


"""bash NETWORK_ID=xxx curl -H 'Content-Type:application/json' -X POST -d "{ "user":{"key":"abc"}, "placements":[{ "divName":"div0", "networkId":$NETWORK_ID, "siteId":1234, "adTypes":[5]}]}" https://e-$NETWORK_ID.adzerk.net/api/v2 """

That's it! If you are running into any issues, please reach out to support or contact your customer support manager.

All ad tech in your inbox

Subscribe to our newsletter to stay up to date with the latest news.