Skip to content

Commit

Permalink
try update consent config
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloChecked committed Oct 10, 2024
1 parent ece5029 commit 33cdf68
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions blog/components/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,6 @@ export const Base = (props: BaseProps) => html`

function googleTagManagerScript() {
return html`
<!-- iubenda -->
<script type="text/javascript">
var _iub = _iub || [];
_iub.csConfiguration = {
siteId: 3794720,
cookiePolicyId: 82254613,
lang: "en",
storage: { useSiteId: true },
};
</script>
<script
type="text/javascript"
src="https://cs.iubenda.com/autoblocking/3794720.js"
></script>
<script
type="text/javascript"
src="//cdn.iubenda.com/cs/gpp/stub.js"
></script>
<script
type="text/javascript"
src="//cdn.iubenda.com/cs/iubenda_cs.js"
charset="UTF-8"
async
></script>
<!-- Google tag (gtag.js) -->
<script
async
Expand All @@ -121,11 +96,23 @@ function googleTagManagerScript() {
"default",
{
ad_storage: "denied",
analytics_storage: "granted",
ad_user_data: "denied",
ad_personalization: "denied",
analytics_storage: "denied",
},
]);
setTimeout(() => {
window.dataLayer.push([
"consent",
"update",
{
ad_user_data: "granted",
ad_personalization: "granted",
ad_storage: "granted",
analytics_storage: "granted",
},
]);
}, 1000);
</script>
`;
}

0 comments on commit 33cdf68

Please sign in to comment.