Keen

Send your event data from RudderStack to Keen.

Keen is a customer analytics platform that allows you to collect, analyze and get invaluable marketing insights from your customer event data.

RudderStack supports S2S (Server to Server) cloud mode and Web Native SDK for integration with Keen. You can thus send event data attached to Keen collections using RudderStack APIs.

Find the open source transformer code for this destination in the GitHub repository.

Connection compatibility

Destination info
  • Status: Generally Available
  • Supported sources: Android, iOS , Web, Unity, AMP , Cloud, Warehouse, React Native , Flutter, Cordova, Shopify
  • Refer to it as KEEN in the Integrations object.

Connection modes
SourceCloud modeDevice modeHybrid mode
AMPsupportednot supportednot supported
Androidsupportednot supportednot supported
Cloudsupportednot supportednot supported
Cordovasupportednot supportednot supported
Fluttersupportednot supportednot supported
iOSsupportednot supportednot supported
React Nativesupportednot supportednot supported
Shopifysupportednot supportednot supported
Unitysupportednot supportednot supported
Warehousesupportednot supportednot supported
Websupportedsupportednot supported
Supported message types
SourceIdentifyPageTrackScreenGroupAlias
Cloud mode
Supported sourcesnot supportedsupportedsupportednot supportednot supportednot supported
Device mode
Websupportedsupportedsupportednot supportednot supportednot supported
info

In the web device mode integration, that is, using JavaScript SDK as a source, RudderStack loads the Keen native SDK from thehttps://cdn.jsdelivr.net/ domain.

Based on your website’s content security policy, you might need to allowlist this domain to load the Keen SDK successfully.

Get started

Once you have confirmed that the platform supports sending events to Keen, perform the steps below:

  • From your RudderStack dashboard, add the source. From the list of destinations, select Keen.
  • Give a name to the destination and click Next. You should then see the following screen:

Connection Settings for Keen in RudderStack

  • Please enter the Project ID and Write Key.
  • You can enable the Use native SDK to send events setting to send events via device mode through Keen’s native JavaScript SDK.

Configuring Add-ons

If enabled, RudderStack attaches the following Keen add-ons to the events, which helps in their data enrichment before routing them to Keen:

Add-onDescription
Geo IP Add OnThe enriched output will be available under the ip_geo_info key.
User Agent Add OnThe enriched output will be available under the parsed_user_agent key.
URL Parsing Add OnThe enriched output will be available under the parsed_page_url key.
Referrer Parsing Add OnThe enriched output will be available under the referrer_info key.
info
Note: We only pass the IP, page and referrer add-ons to Keen if the event contains a valid ip, page, URL and referrer property.

Keen add-ons settings in RudderStack

  • Once you have finalized all settings, click Next to complete the configuration. Keen will now be added as a destination in RudderStack.

Identify

Calling rudderanalytics.identify() has no effect on Keen whatsoever, when called from the server-side SDKs. However, when called from client-side SDKs, RudderStack calls the Keen extendEventswith a user object userIdand traits passed in from the identify call.

Calling extendEvents adds the user object to all subsequentrecordEvent calls to Keen. Hence, to view the identify data , you will have to make a subsequent page and track call from RudderStack.

A sample identify call is as shown in the following code snippet:

rudderanalytics.identify("my-userID", {
  name: "Tintin",
  city: "Brussels",
  country: "Belgium",
  email: "tintin@herge.com",
});

This will pass the below user to every subsequent event data:

user: {
  userId: "my-userID",
  traits: {
    name: "Tintin",
    city: "Brussels",
    country: "Belgium",
    email: "tintin@herge.com"
  }
}

Page

Calling rudderanalytics.page() will pass the page properties to the Keen collection Viewed <category> <name> page. To learn more about the pagecall, please refer to our RudderStack Events Specification documentation.

A sample page call is as shown in the snippet below:

// "home" is the name of the page.
rudderanalytics.page("home", {
  path: "path",
  url: "url",
  title: "title",
  search: "search",
  referrer: "referrer"
});

This will send the following properties to the Keen Viewed Home Page collection:

  • path
  • url
  • title
  • search
  • referrer
  • userId
  • user traits (If coming from the client SDKs)

Track

Calling rudderanalytics.track() will pass the event properties to Keen on the collection event-name. To learn more about the trackcall, please refer to our RudderStack Events Specification documentation.

An example track call is as shown:

rudderanalytics.track("Track me", {
  category: "category",
  label: "label",
  value: "value",
});

The above call will send the following properties to Keen’s Track me collection:

  • category
  • label
  • value
  • userId
  • user traits (If coming from the client SDKs)

Screen

The screen call records the screen views of the user in your App. If you have turned on the screen views in your App implementation from the [iOS or Android SDK it will be registered in your dashboard. We’ll forward the properties you’ve passed along with the screen call as it is.

Here is a sample screen call in using RudderStack iOS SDK.

[[RudderClient sharedInstance] screen:@"Main"
            properties:@{@"prop_key" : @"prop_value"}];

FAQ

Where do I get the Project ID and Write Key for configuring Keen on RudderStack?

You will find the Project ID and Write Key by navigating to Projects - (select your project) - Access - Project Details.


Questions? Contact us by email or on Slack