Skip to content

Commit

Permalink
docs: Add impression data guide outline and sidebar entry
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Feb 9, 2022
1 parent 281115e commit 6ee9a43
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions website/docs/how-to/how-to-send-impression-data-to-a-sink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: How to send impression data to a sink
---

Unleash allows you to gather [**impression data**](../advanced/impression-data.md) from your feature toggles, giving you complete visibility into who checked what toggles and when. What you do with this data is entirely up to you, but a common use case is to send it off to an aggregation and analytics service such as [Google Analytics](analytics.google.com/) or [Posthog](https://posthog.com/).

This guide will take you through everything you need to do in Unleash to facilitate such a workflow. It will show you how to send data to Google Analytics (and Posthog?) as an example sink, but the exact same principles will apply to any other service of the same kind.

## Prerequisites

We will assume that you have the necessary details for your third-party service:

- **where to send the data to**. We'll refer to this in the code samples below as **`<sink-url>`**.
- **what format the data needs to be in**. This will determine how you transform the event data before you send it.

In addition you'll need to have a toggle to record impression data for and an [Unleash client SDK](../sdks/index.md) that supports impression data. This guide will use the [JavaScript proxy SDK](../sdks/proxy-javascript.md).

When you have those things sorted, follow the below steps.

## Enable impression data for your feature toggle {#step-1}

This is in the admin UI ... you do this by

### Enabling impression data for new toggles

### Enabling impression data for existing toggles

## Capture impression events in your client {#step-2}


## Transform the data {#step-3}

## Send the event data to your sink {#step-4}
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module.exports = {
'user_guide/create_feature_toggle',
'how-to/how-to-define-custom-context-fields',
'how-to/how-to-use-custom-strategies',
'how-to/how-to-send-impression-data-to-a-sink'
],
type: 'category',
link: {
Expand Down

0 comments on commit 6ee9a43

Please sign in to comment.