rm unnecessary code

This commit is contained in:
MaxBUhe 2023-06-23 15:08:09 +02:00
parent fd79710158
commit d505d8530a
2 changed files with 18 additions and 28 deletions

View File

@ -4,28 +4,22 @@
</script> </script>
[{if $oViewConf->D3blShowGtmScript()}] [{if $oViewConf->D3blShowGtmScript()}]
[{if $oViewConf->getGtmContainerId()}][{strip}] [{if $oViewConf->getGtmContainerId()}]
<!-- Google Tag Manager --> [{strip}]
<script [{$oViewConf->getGtmScriptAttributes()}]> <!-- Google Tag Manager -->
(function (w, d, s, l, i) { <script [{$oViewConf->getGtmScriptAttributes()}]>
w[l] = w[l] || []; (function (w, d, s, l, i) {
w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'}); w[l] = w[l] || [];
var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
j.async = true; var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; j.async = true;
f.parentNode.insertBefore(j, f); j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]'); f.parentNode.insertBefore(j, f);
</script> })(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
<!-- End Google Tag Manager --> </script>
<!-- End Google Tag Manager -->
[{if $oViewConf->getTopActionClassName() === "alist" }] [{/strip}]
[{* include file="ga4_view_item_list.tpl" gtmCategory=$oView->getActiveCategory() gtmProducts=$oView->getArticleList() listtype=$oView->getListType() *}]
[{elseif $oViewConf->getTopActionClassName() === "details" }]
[{* include file="ga4_view_item.tpl" gtmProduct=$oView->getProduct() *}]
[{elseif $oViewConf->getTopActionClassName() === "search" }]
[{elseif $oViewConf->getTopActionClassName() === "basket" }]
[{/if}]
[{/strip}][{/if}]
[{/if}] [{/if}]
[{/if}]
[{$smarty.block.parent}] [{$smarty.block.parent}]

View File

@ -22,7 +22,7 @@ $aModule = [
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a> Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
", ",
'thumbnail' => 'thumbnail.png', 'thumbnail' => 'thumbnail.png',
'version' => '2.7.0', 'version' => '2.8.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)', 'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com', 'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/', 'url' => 'https://www.oxidmodule.com/',
@ -31,11 +31,7 @@ $aModule = [
OECategory::class => Category::class, OECategory::class => Category::class,
OEBasket::class => Basket::class OEBasket::class => Basket::class
], ],
'templates' => [ 'templates' => [],
// GA4 events
'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl',
'ga4_view_item_list.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item_list.tpl',
],
'blocks' => [ 'blocks' => [
// tag manager js // tag manager js
[ [