@@ -3,12 +3,12 @@ import { loadScript } from '@linode/utilities'; // `loadScript` from `useScript`
3
3
import { sha256 } from 'js-sha256' ;
4
4
import React from 'react' ;
5
5
6
- import { APP_ROOT , PENDO_API_KEY } from 'src/constants' ;
7
- import {
8
- ONE_TRUST_COOKIE_CATEGORIES ,
9
- checkOptanonConsent ,
10
- getCookie ,
11
- } from 'src/utilities/analytics/utils' ;
6
+ import { ADOBE_ANALYTICS_URL , APP_ROOT , PENDO_API_KEY } from 'src/constants' ;
7
+ // import {
8
+ // ONE_TRUST_COOKIE_CATEGORIES,
9
+ // checkOptanonConsent,
10
+ // getCookie,
11
+ // } from 'src/utilities/analytics/utils';
12
12
13
13
declare global {
14
14
interface Window {
@@ -72,21 +72,21 @@ export const usePendo = () => {
72
72
const accountId = hashUniquePendoId ( account ?. euuid ) ;
73
73
const visitorId = hashUniquePendoId ( profile ?. uid . toString ( ) ) ;
74
74
75
- const optanonCookie = getCookie ( 'OptanonConsent' ) ;
76
- // Since OptanonConsent cookie always has a .linode.com domain, only check for consent in dev/staging/prod envs.
77
- // When running the app locally, do not try to check for OneTrust cookie consent, just enable Pendo.
78
- const hasConsentEnabled =
79
- APP_ROOT . includes ( 'localhost' ) ||
80
- checkOptanonConsent (
81
- optanonCookie ,
82
- ONE_TRUST_COOKIE_CATEGORIES [ 'Performance Cookies' ]
83
- ) ;
75
+ // const optanonCookie = getCookie('OptanonConsent');
76
+ // // Since OptanonConsent cookie always has a .linode.com domain, only check for consent in dev/staging/prod envs.
77
+ // // When running the app locally, do not try to check for OneTrust cookie consent, just enable Pendo.
78
+ // const hasConsentEnabled =
79
+ // APP_ROOT.includes('localhost') ||
80
+ // checkOptanonConsent(
81
+ // optanonCookie,
82
+ // ONE_TRUST_COOKIE_CATEGORIES['Performance Cookies']
83
+ // );
84
84
85
85
// This URL uses a Pendo-configured CNAME (M3-8742).
86
- const PENDO_URL = `https://content.psp.cloud.linode.com/agent/static/${ PENDO_API_KEY } /pendo.js` ;
86
+ // const PENDO_URL = `https://content.psp.cloud.linode.com/agent/static/${PENDO_API_KEY}/pendo.js`;
87
87
88
88
React . useEffect ( ( ) => {
89
- if ( PENDO_API_KEY && hasConsentEnabled ) {
89
+ if ( ADOBE_ANALYTICS_URL && PENDO_API_KEY ) {
90
90
// Adapted Pendo install script for readability
91
91
// Refer to: https://support.pendo.io/hc/en-us/articles/21362607464987-Components-of-the-install-script#01H6S2EXET8C9FGSHP08XZAE4F
92
92
@@ -118,7 +118,7 @@ export const usePendo = () => {
118
118
} ) ;
119
119
120
120
// Load Pendo script into the head HTML tag, then initialize Pendo with metadata
121
- loadScript ( PENDO_URL , {
121
+ loadScript ( ADOBE_ANALYTICS_URL , {
122
122
location : 'head' ,
123
123
} ) . then ( ( ) => {
124
124
window . pendo . initialize ( {
@@ -166,5 +166,5 @@ export const usePendo = () => {
166
166
} ) ;
167
167
} ) ;
168
168
}
169
- } , [ PENDO_URL , accountId , hasConsentEnabled , visitorId ] ) ;
169
+ } , [ ADOBE_ANALYTICS_URL , accountId , visitorId ] ) ;
170
170
} ;
0 commit comments