Skip to main content
Enterprise Edition FeatureThis feature requires an Enterprise plan. View plans or contact sales to learn more.
Onyx Enterprise Edition allows you to configure a custom analytics provider.
1

Set the CUSTOM_ANALYTICS_SECRET_KEY environment variable

Set the CUSTOM_ANALYTICS_SECRET_KEY environment variable to some random string. Make sure you have the value saved temporarily somewhere.Re-deploy Onyx.
2

Go to the Custom Analytics tab in the Admin Panel

Go to the Custom Analytics tab in the Admin Panel.
3

Enter in the Javascript snippet provided by your Analytics provider

This snippet would normally be placed within the <head> tags at the base of your project. For the Secret Key, use the value you saved in Step 1.
The <script> tag MUST be removed before being copied into the text box.
For reference: PostHog’s documentation on how to set up a custom analytics provider.