Skip to content

Commit

Permalink
Merge pull request #121 from farabi-deriv/farabi/bot-2365/configure-g…
Browse files Browse the repository at this point in the history
…rowthbook-and-rudderstack

Farabi/bot-2365/configure-growthbook-and-rudderstack
  • Loading branch information
sandeep-deriv authored Nov 12, 2024
2 parents 366ab95 + d408eff commit 5e1d38b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-and-deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ jobs:
R2_PROJECT_NAME: ${{ vars.R2_PROJECT_NAME }}
TRANSLATIONS_CDN_URL: ${{ vars.TRANSLATIONS_CDN_URL }}
CROWDIN_BRANCH_NAME: production
IS_GROWTHBOOK_ENABLED: ${{ vars.IS_GROWTHBOOK_ENABLED }}
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
GROWTHBOOK_DECRYPTION_KEY: ${{ vars.GROWTHBOOK_DECRYPTION_KEY }}
GD_API_KEY: ${{ secrets.GD_API_KEY }}
GD_APP_ID: ${{ secrets.GD_APP_ID }}
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }}

- name: Run tests for Eslint
run: npm run test:lint
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-and-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ jobs:
R2_PROJECT_NAME: ${{ vars.R2_PROJECT_NAME }}
TRANSLATIONS_CDN_URL: ${{ vars.TRANSLATIONS_CDN_URL }}
CROWDIN_BRANCH_NAME: staging
IS_GROWTHBOOK_ENABLED: ${{ vars.IS_GROWTHBOOK_ENABLED }}
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
GROWTHBOOK_DECRYPTION_KEY: ${{ vars.GROWTHBOOK_DECRYPTION_KEY }}
GD_API_KEY: ${{ secrets.GD_API_KEY }}
GD_APP_ID: ${{ secrets.GD_APP_ID }}
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }}

- name: Run tests for Eslint
run: npm run test:lint
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-and-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ jobs:
R2_PROJECT_NAME: ${{ vars.R2_PROJECT_NAME }}
TRANSLATIONS_CDN_URL: ${{ vars.TRANSLATIONS_CDN_URL }}
CROWDIN_BRANCH_NAME: staging
IS_GROWTHBOOK_ENABLED: ${{ vars.IS_GROWTHBOOK_ENABLED }}
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
GROWTHBOOK_DECRYPTION_KEY: ${{ vars.GROWTHBOOK_DECRYPTION_KEY }}
GD_API_KEY: ${{ secrets.GD_API_KEY }}
GD_APP_ID: ${{ secrets.GD_APP_ID }}
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }}

- name: Run tests for Eslint
run: npm run test:lint
Expand Down
4 changes: 2 additions & 2 deletions src/utils/analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ export const AnalyticsInitializer = async () => {
.catch(() => FIREBASE_INIT_DATA);
if (process.env.RUDDERSTACK_KEY && flags?.tracking_rudderstack) {
const ppc_campaign_cookies =
Cookies.getJSON('utm_data') === 'null'
Cookies.get('utm_data') === 'null'
? {
utm_source: 'no source',
utm_medium: 'no medium',
utm_campaign: 'no campaign',
utm_content: 'no content',
}
: Cookies.getJSON('utm_data');
: Cookies.get('utm_data');

const config = {
growthbookKey: flags.marketing_growthbook ? process.env.GROWTHBOOK_CLIENT_KEY : undefined,
Expand Down

0 comments on commit 5e1d38b

Please sign in to comment.