or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
💫 Segment Partner Destination Documentation Template
Kana Destination
Kana provides pricing infrastructure for internet businesses. This destination allows for a low-code integration of Kana, using Segment events to record the usage of your features in order to measure entitlement, gain insights and ensure customers are charged correctly.
This destination is maintained by Kana. For any issues with the destination, contact the Kana team.
Getting Started
Supported Methods
Kana supports the following methods, as specified in the Segment Spec.
{% include content/connection-modes.md %}
Setup
Identify
Send Identify calls to create, update, merge and identify users in Kana.
Kana looks for the following traits in Identify events which map to user fields in Kana:
userId
id
of a user in Kana. This is the external identifer of your user.traits.name
name
of a user in Kana.traits.email
email
of a user in Kana.traits.billingUserId
billingId
of a user in Kana. Must be the customerid
for either Stripe or Chargebee as valid billing providers.Warning Hint Block: All other traits will be dropped as they do not map to a field in Kana.
Creating, updating or merging
Kana looks at the
userId
andemail
to determine when to create, update or merge a user. TheuserId
takes precedence as the canonical identifier. Kana allows for multiple users to have the sameemail
.The following examples illustrate when a user will be created, updated or merged in Kana based on (1) what is sent in the Segment event payload, and (2) what users & which details are present in Kana:
Info Hint Block: Users which were initially imported from Stripe may have no
userId
but could have anemail
. Kana will try update or merge these users when Segment events come in with anemail
which matches. However, in the event they could not be merged (likely meaning there are multiple users with the same email and one was a Stripe import which has nouserId
), Kana will flag these users to you in the Kana dashboard. There will be two boxes - one calling out users without abillingId
and one calling out users which have the sameemail
. You will be able to merge or delete these users in case it's necessary.See more on how creating, updating and merging works.
Track
Send Track calls to Kana in order to record when a customer has used a particular feature. For example:
Kana looks at all properties in Track events for mapping rules. However, Kana considers the following properties to be special:
properties.featureId
id
of a feature in Kana. Defaults to the any mapping rules if not present.properties.delta
1
.Warning Hint Block: Events sent in without a
userId
(aka. anonymous events) will be dropped and responded to with a400 Bad Request
error.Mapping Rules
There are two ways to map Segment events to Kana features:
properties.featureId
field within a Segment eventThe latter can be used as a no-code solution (which also won't muddy data to other destinations) whereby Kana will look at incoming events and process them alongside rules you have defined to attribute them to features.
These rules can be created on the Segment Integration page{:target="_blank"} within the Kana dashboard{:target="blank"}. They can be set based on the name and properties of a track event with multiple AND conditions if required.
Info Hint Block: All events will be sent from your source to Kana and stored there - no matter whether these will be used to record feature usage or not. Events which could not map to features are exposed within Kana. Any rules created afterwards will retroactively apply to these events, meaning events will reprocess against these new rules in an attempt to map them to features. If there are events you do not want to send to Kana (as they will never be used to record feature usage) then it's recommended that you filter these events from sending.
See more on how to setup rules in the Kana dashboard.