Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy signals example #1201

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
silesky committed Dec 10, 2024
commit 91d96f6e7f185fd416e654166a606fce94ced6b4
8 changes: 5 additions & 3 deletions packages/signals/signals-example/src/lib/analytics.ts
Original file line number Diff line number Diff line change
@@ -62,12 +62,14 @@ const isStage =
storage.getStorage().stage === 'true' || process.env.STAGE === 'true'
const writeKey = storage.getStorage().writeKey || process.env.WRITEKEY

console.log('Query params allowed:', JSON.stringify(Object.values(queryParams)))

if (!writeKey) {
throw new Error('No writekey provided.')
throw new Error(
`No writekey provided. please add ?${queryParams.WRITE_KEY_NAME}=<writekey> to the URL`
)
}

console.log('Query params allowed:', JSON.stringify(Object.values(queryParams)))

export const analytics = new AnalyticsBrowser()

const processSignalExample: ProcessSignal = (