We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 905b11a commit 2979be6Copy full SHA for 2979be6
packages/script/src/extensions/client-conversion-tracking.js
@@ -1,5 +1,15 @@
1
const initClientConversionTracking = () => {
2
- const { a: API_HOST, k: PUBLISHABLE_KEY } = window._dubAnalytics;
+ const { a: API_HOST, k: PUBLISHABLE_KEY } = window._dubAnalytics || {};
3
+
4
+ if (!API_HOST) {
5
+ console.warn('[dubAnalytics] Missing API_HOST');
6
+ return;
7
+ }
8
9
+ if (!PUBLISHABLE_KEY) {
10
+ console.warn('[dubAnalytics] Missing PUBLISHABLE_KEY');
11
12
13
14
// Track lead conversion
15
const trackLead = async (input) => {
0 commit comments