Skip to content

Commit

Permalink
docs: Add steps to enable impression events for existing toggles.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Feb 9, 2022
1 parent 752a1df commit 31b3792
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion website/docs/how-to/how-to-send-impression-data-to-a-sink.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ When you create a new feature toggle via the UI, there's an option at the end of

![The create feature toggle form. There's a toggle at the end of the form that enables or disables impression data. It's labeled "impression data".](/img/enable-impression-data.png)

To create a feature toggle with impression data enabled, set the `impressionData` option to `true` in the request payload:
To create a feature toggle with impression data enabled, set the `impressionData` option to `true` in the request payload, as seen below. For more options, check the [reference docs on creating features](../api/admin/feature-toggles-api-v2.md#create-toggle).

<ApiRequest verb="post" payload={{name: "<feature-toggle-name>", impressionData: true}} url="api/admin/projects/<project-id>/features" title="Create a feature toggle with impression data enabled."/>

Expand All @@ -43,6 +43,9 @@ To enable impression data for an existing toggle, use the "edit" button on the t

![The create feature toggle form. There's a toggle at the end of the form that enables or disables impression data. It's labeled "impression data".](/img/enable-impression-data-existing-toggle.png)

To enable impression data for an existing toggle, use the [API's toggle patching functionality](../api/admin/feature-toggles-api-v2.md#patch-toggle):
<ApiRequest verb="patch" payload={[{op: "replace", path: "/impressionData", value: true}]} url="api/admin/projects/<project-id>/features/<feature-toggle-name>" title="Enable impression data on an existing toggle."/>


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

Expand Down

0 comments on commit 31b3792

Please sign in to comment.