Skip to content

Commit 911e418

Browse files
authored
Merge pull request #6596 from configcat/develop
Adding ConfigCat source documentation
2 parents 5fee2a4 + 927982e commit 911e418

File tree

1 file changed

+98
-0
lines changed
  • src/connections/sources/catalog/cloud-apps/configcat

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: ConfigCat Source
3+
id: nEjnxv4kbB
4+
beta: true
5+
---
6+
7+
[ConfigCat](https://configcat.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank”} is a feature flag and remote configuration service that empowers developers to control and customize the functionality of their applications. With ConfigCat, you can easily toggle features on and off, alter their settings, and roll out updates to specific users or groups. Targeting is supported through attributes, percentage-based rollouts, and segmentation. ConfigCat is available for all major programming languages and frameworks.
8+
9+
This is an [Event Cloud Source](/docs/sources/#event-cloud-sources) which can not only export data into your Segment warehouse, but can also federate the exported data into your other enabled Segment Destinations.
10+
11+
This source is maintained by ConfigCat. For any issues with the source, [contact their Support team](mailto:[email protected]).
12+
13+
## Getting started
14+
15+
1. From your workspace's [Sources catalog page](https://app.segment.com/goto-my-workspace/sources/catalog){:target="_blank”} click **Add Source**.
16+
2. Search for "ConfigCat" in the Sources Catalog, select ConfigCat, and click **Add Source**.
17+
3. On the next screen, give the Source a name.
18+
19+
- The name is used as a label in the Segment app, and Segment creates a related schema name in your warehouse. The name can be anything, but we recommend using something that reflects the source itself and distinguishes amongst your environments (eg. ConfigCat_Prod, ConfigCat_Staging, ConfigCat_Dev).
20+
21+
4. Click **Add Source** to save your settings.
22+
5. Copy the Write key from the Segment UI.
23+
24+
### Sending feature flag change events from ConfigCat to Twilio Segment
25+
26+
1. Open the [integrations tab](https://app.configcat.com/product/integrations){:target="_blank”} on the ConfigCat Dashboard.
27+
2. Click on Twilio Segment's CONNECT button and set the Twilio Segment Write Key acquired while adding the ConfigCat source in Segment.
28+
3. OPTIONAL - Set the proper server of your Twilio Segment account.
29+
4. You're all set. Go ahead and make some changes on your feature flags then check your events in Twilio Segment.
30+
31+
### Sending feature flag evaluation analytics from ConfigCat to Twilio Segment
32+
33+
1. Log in to the ConfigCat Dashboard and copy the SDK Key for your Config in the specific Environment.
34+
2. In your application's code, **Configure SDKs:**:
35+
- **ConfigCat SDK:** Initialize with your ConfigCat SDK key.
36+
- **Segment SDK:** Set up with the Segment Write Key acquired while adding the ConfigCat source in Segment.
37+
3. **Integrate Feature Flag Evaluations:**
38+
- During the initialization of the ConfigCat SDK, subscribe to the `flagEvaluated` hook.
39+
- Send feature flag evaluation data to Segment using the `Feature Flag Evaluated` event name. Include the following parameters:
40+
- `feature_flag_key`: the feature flag's key
41+
- `value`: the evaluated feature flag's value or Variation ID
42+
- `variation_id` (optional): the evaluated feature flag's Variation ID
43+
- `user` (optional): the user object used during feature flag evaluation.
44+
- You can find code samples in the [ConfigCat Segment Source documentation](https://configcat.com/docs/integrations/segment/#analytics){:target="_blank”}.
45+
46+
## Stream
47+
48+
ConfigCat uses our stream Source component to send Segment event data. It uses a `track` method to send data to Segment. These events are then available in any destination that accepts events, and available in a schema in your data warehouse, so you can query using SQL.
49+
50+
In the "Feature Flag Evaluation" event, the default behavior for ConfigCat is to use the user-object's identifier property as the Segment `userId`. If no identifier is present, the event will be sent with a randomly generated `anonymousId`.
51+
52+
For "Feature Flag Changed" events, the ConfigCat User's ID who made the changes will be sent as the Segment `userId`.
53+
54+
## Events
55+
56+
The table below lists events that ConfigCat sends to Segment. These events appear as tables in your warehouse, and as regular events in other Destinations.
57+
58+
| Event Name | Description |
59+
| ---------------------- | --------------------------------------------------------------------------------------------------- |
60+
| Feature Flag Evaluated | Advanced feature flag evaluation analytics events about your feature flag usages, A/B test results. |
61+
| Feature Flag Changed | Feature flag change events to be able to see the effect of your feature flag changes. |
62+
63+
## Event Properties
64+
65+
The tables below list the properties included in the events listed above.
66+
67+
### `Feature Flag Evaluated` event
68+
69+
| Property Name | Description |
70+
| ---------------- | ---------------------------------------------------------------- |
71+
| `feature_flag_key` | The feature flag's key |
72+
| `value` | The evaluated feature flag's value or Variation ID |
73+
| `variation_id` | The evaluated feature flag's Variation ID |
74+
| `user` | The user object used during feature flag evaluation |
75+
76+
### `Feature Flag Changed` event
77+
78+
| Property Name | Description |
79+
| ----------------- | ---------------------------------------------------------------- |
80+
| `details` | A brief summary of the change |
81+
| `user_email` | The ConfigCat user's email who made the changes |
82+
| `user_full_name` | The ConfigCat user's full name who made the changes |
83+
| `product_id` | The product's ID where the change happened |
84+
| `product_name` | The product's name where the change happened |
85+
| `config_id` | The config's ID where the change happened |
86+
| `config_name` | The config's name where the change happened |
87+
| `environment_id` | The environment's ID where the change happened |
88+
| `environment_name` | The environment's name where the change happened |
89+
| `url` | A direct link to the config/feature flag |
90+
| `user` | The user object used during feature flag evaluation |
91+
92+
## Adding Destinations
93+
94+
Now that your Source is set up, you can connect it with Destinations.
95+
96+
Log into your downstream tools and check to see that your events appear as expected, and that they contain all of the properties you expect. If your events and properties don’t appear, check the [Event Delivery](/docs/connections/event-delivery/) tool, and refer to the Destination docs for each tool for troubleshooting.
97+
98+
If there are any issues with how the events are arriving to Segment, [contact the ConfigCat support team](mailto:[email protected]).

0 commit comments

Comments
 (0)