@codecademy/tracking 1.0.27-alpha.e7527ab86d.0 → 1.0.27-alpha.e7f59a4fa4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export function setGoogleConsentDefaults(_ref) {
21
21
  security_storage: 'granted',
22
22
  ad_user_data: 'denied',
23
23
  ad_personalization: 'denied',
24
- wait_for_update: 500
24
+ wait_for_update: 1200
25
25
  });
26
26
  } else {
27
27
  gtag('consent', 'default', {
@@ -32,7 +32,7 @@ export function setGoogleConsentDefaults(_ref) {
32
32
  security_storage: 'granted',
33
33
  ad_user_data: 'granted',
34
34
  ad_personalization: 'granted',
35
- wait_for_update: 500
35
+ wait_for_update: 1200
36
36
  });
37
37
  }
38
38
  gtag('consent', 'default', {
@@ -43,7 +43,7 @@ export function setGoogleConsentDefaults(_ref) {
43
43
  security_storage: 'granted',
44
44
  ad_user_data: 'denied',
45
45
  ad_personalization: 'denied',
46
- wait_for_update: 500,
46
+ wait_for_update: 1200,
47
47
  region: ['DE', 'NO', 'BE', 'FI', 'PT', 'BG', 'DK', 'LT', 'LU', 'LV', 'HR', 'FR', 'HU', 'SE', 'MC', 'SI', 'SK', 'MF', 'SM', 'GB', 'YT', 'IE', 'GF', 'EE', 'MQ', 'MT', 'GP', 'IS', 'GR', 'IT', 'ES', 'RE', 'AT', 'CY', 'CZ', 'AX', 'PL', 'RO', 'LI', 'NL']
48
48
  });
49
49
  }
@@ -17,12 +17,12 @@ export const initializeTrackingIntegrations = async _ref => {
17
17
  writeKey = _ref.writeKey;
18
18
  // 1. Wait 1000ms to allow any other post-hydration logic to run first
19
19
  await new Promise(resolve => setTimeout(resolve, 1000));
20
-
21
- // 2. Load in OneTrust's banner and wait for its `OptanonWrapper` callback
22
20
  setGoogleConsentDefaults({
23
21
  scope,
24
22
  optedOutExternalTracking
25
23
  });
24
+
25
+ // 2. Load in OneTrust's banner and wait for its `OptanonWrapper` callback
26
26
  await initializeOneTrust({
27
27
  scope,
28
28
  production
@@ -5,7 +5,7 @@ export const initializeOneTrust = async _ref => {
5
5
  script.setAttribute('async', 'true');
6
6
  script.setAttribute('src', 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js');
7
7
  script.setAttribute('type', 'text/javascript');
8
- script.setAttribute('data-domain-script', "cfa7b129-f37b-4f5a-9991-3f75ba7b85fb".concat(production ? '' : ''));
8
+ script.setAttribute('data-domain-script', "cfa7b129-f37b-4f5a-9991-3f75ba7b85fb".concat(production ? '' : '-test'));
9
9
  document.body.appendChild(script);
10
10
  const style = document.createElement('style');
11
11
  style.textContent = rawStyles;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/tracking",
3
3
  "description": "Tracking library for Codecademy",
4
- "version": "1.0.27-alpha.e7527ab86d.0",
4
+ "version": "1.0.27-alpha.e7f59a4fa4.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "files": [
7
7
  "dist/**"
@@ -13,5 +13,5 @@
13
13
  "access": "public"
14
14
  },
15
15
  "repository": "git@github.com:codecademy-engineering/mono.git",
16
- "gitHead": "2e1ccd409f4affa737b69ecfbafe6d8fdb66cf60"
16
+ "gitHead": "83756b6597c5e8076d3314d8eac9db8e9d3c0160"
17
17
  }