diff --git a/src/Components/ConsentCustom.tsx b/src/Components/ConsentCustom.tsx index 547685b..bf1eec7 100644 --- a/src/Components/ConsentCustom.tsx +++ b/src/Components/ConsentCustom.tsx @@ -933,7 +933,7 @@ const ConsentComponentCustomApp = (props: any) => { onClick={async () => { if (revokeConsentOption === 'consent') { await handleRevokeBtn(); - if (level > 1) { + if (level > 1 || window['aesirx1stparty']) { setTimeout(() => { window.location.reload(); }, 1000); diff --git a/src/Hooks/useConsentStatus.ts b/src/Hooks/useConsentStatus.ts index 7f65826..30b0c98 100644 --- a/src/Hooks/useConsentStatus.ts +++ b/src/Hooks/useConsentStatus.ts @@ -175,6 +175,16 @@ const useConsentStatus = (endpoint?: string, layout?: string, props?: WalletConn if (level && level !== '0') { window.funcAfterConsent && window.funcAfterConsent(); window.configBlockJS && unBlockScripts(); + if (window['aesirx_analytics_degistered_scripts']) { + const blockJSList = window['aesirx_analytics_degistered_scripts']; + Object.keys(blockJSList).forEach((key) => { + const scriptNode = document.createElement('script'); + scriptNode.src = + blockJSList[key].src + (blockJSList[key].ver ? `?ver=${blockJSList[key].ver}` : ''); + scriptNode.type = 'text/javascript'; + document.body.appendChild(scriptNode); + }); + } } };