diff --git a/README.md b/README.md index 9ead08c0fe..0997812865 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ Here's the list of all the environment variables: | `NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING` | FCM vapid key on staging | `NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_PRODUCTION` | Web3Auth and Google credentials (production) | `NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_STAGING` | Web3Auth and Google credentials (staging) +| `NEXT_PUBLIC_SPINDL_SDK_KEY` | [Spindl](http://spindl.xyz) SDK key If you don't provide some of the variables, the corresponding features will be disabled in the UI. diff --git a/src/services/analytics/spindl.ts b/src/services/analytics/spindl.ts index ed8ad04581..1c1f2a4350 100644 --- a/src/services/analytics/spindl.ts +++ b/src/services/analytics/spindl.ts @@ -2,10 +2,10 @@ import spindl from '@spindl-xyz/attribution-lite' import { IS_PRODUCTION } from '@/config/constants' export const spindlInit = () => { - if (!IS_PRODUCTION) return - const SPINDL_SDK_KEY = process.env.NEXT_PUBLIC_SPINDL_SDK_KEY + if (!IS_PRODUCTION || !SPINDL_SDK_KEY) return + spindl.configure({ sdkKey: SPINDL_SDK_KEY || '', debugMode: false,