50 lines
2.4 KiB
Smarty
50 lines
2.4 KiB
Smarty
{**
|
|
* ISC License
|
|
*
|
|
* Copyright (c) 2024 idnovate.com
|
|
* idnovate is a Registered Trademark & Property of idnovate.com, innovación y desarrollo SCP
|
|
*
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
* copyright notice and this permission notice appear in all copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
*
|
|
* @author idnovate
|
|
* @copyright 2024 idnovate
|
|
* @license https://www.isc.org/licenses/ https://opensource.org/licenses/ISC ISC License
|
|
*}
|
|
<script data-keepinline='true'>
|
|
{assign var="consentType" value="default"}
|
|
|
|
{foreach $gtm as $key => $value}
|
|
{if $value}
|
|
{assign var="consentType" value="update"}
|
|
{break}
|
|
{/if}
|
|
{/foreach}
|
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag() { dataLayer.push(arguments); }
|
|
|
|
gtag('consent', '{$consentType}', {
|
|
'ad_storage' : '{if isset($gtm['ad_storage']) && $gtm['ad_storage']}granted{else}denied{/if}',
|
|
'ad_user_data' : '{if isset($gtm['ad_user_data']) && $gtm['ad_user_data']}granted{else}denied{/if}',
|
|
'ad_personalization' : '{if isset($gtm['ad_personalization']) && $gtm['ad_personalization']}granted{else}denied{/if}',
|
|
'analytics_storage' : '{if isset($gtm['analytics_storage']) && $gtm['analytics_storage']}granted{else}denied{/if}',
|
|
'functionality_storage' : '{if isset($gtm['functionality_storage']) && $gtm['functionality_storage']}granted{else}denied{/if}',
|
|
'personalization_storage' : '{if isset($gtm['personalization_storage']) && $gtm['personalization_storage']}granted{else}denied{/if}',
|
|
'security_storage' : '{if isset($gtm['security_storage']) && $gtm['security_storage']}granted{else}denied{/if}',
|
|
'wait_for_update' : 1000
|
|
});
|
|
|
|
gtag('set', 'url_passthrough', false);
|
|
gtag('set', 'ads_data_redaction', true);
|
|
</script>
|