Skip to content

Commit

Permalink
Update gtag, gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
vietredweb committed May 2, 2024
1 parent ac7f5df commit f4c819d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/AnalyticsNext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const AnalyticsNext = ({
const init = async () => {
const data: any = await getConsentTemplate(window.location.host);
setLayout(data?.data?.template ?? process.env.NEXT_PUBLIC_CONSENT_LAYOUT);
setGtagId(data?.data?.gtagID ?? process.env.NEXT_PUBLIC_ANALYTICS_GTAG_ID);
setGtmId(data?.data?.gtmID ?? process.env.NEXT_PUBLIC_ANALYTICS_GTM_ID);
setGtagId(data?.data?.gtag_id ?? process.env.NEXT_PUBLIC_ANALYTICS_GTAG_ID);
setGtmId(data?.data?.gtm_id ?? process.env.NEXT_PUBLIC_ANALYTICS_GTM_ID);
};
init();
}, []);
Expand Down
4 changes: 2 additions & 2 deletions src/AnalyticsReact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const AnalyticsReact = ({ location, history, oldLayout = false, children }: Anal
const init = async () => {
const data: any = await getConsentTemplate(window.location.host);
setLayout(data?.data?.template ?? process.env.REACT_APP_CONSENT_LAYOUT);
setGtagId(data?.data?.gtagID ?? process.env.REACT_APP_ANALYTICS_GTAG_ID);
setGtmId(data?.data?.gtmID ?? process.env.REACT_APP_ANALYTICS_GTM_ID);
setGtagId(data?.data?.gtag_id ?? process.env.REACT_APP_ANALYTICS_GTAG_ID);
setGtmId(data?.data?.gtm_id ?? process.env.REACT_APP_ANALYTICS_GTM_ID);
};
init();
}, []);
Expand Down
4 changes: 2 additions & 2 deletions src/analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const ConsentPopup = ({ visitor_uuid, event_uuid }: any) => {
const init = async () => {
const data: any = await getConsentTemplate(window.location.host);
setLayout(data?.data?.template ?? window['consentLayout']);
setGtagId(data?.data?.gtagID ?? window['analyticsGtagId']);
setGtmId(data?.data?.gtmID ?? window['analyticsGtmId']);
setGtagId(data?.data?.gtag_id ?? window['analyticsGtagId']);
setGtmId(data?.data?.gtm_id ?? window['analyticsGtmId']);
};
init();
}, []);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/consent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ const verifySignature = async (

const getConsentTemplate = async (domain: any) => {
try {
const endpointWeb3 = 'https://dev.web3id.backend.aesirx.io:8002';
const endpointWeb3 = 'https://web3id.backend.aesirx.io:8001';
const data = await axios.get(`${endpointWeb3}/datastream/template/${domain}`, {
headers: {
'Content-Type': 'application/json',
Expand All @@ -321,7 +321,7 @@ const getConsentTemplate = async (domain: any) => {
return data;
}
} catch (error) {
console.log('error',error);
console.log('error', error);
}
};

Expand Down

0 comments on commit f4c819d

Please sign in to comment.