Poprawa obsługi Google Tag Manager w szablonie produktu
This commit is contained in:
BIN
templates_user/.DS_Store
vendored
Normal file
BIN
templates_user/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
templates_user/components/.DS_Store
vendored
Normal file
BIN
templates_user/components/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -241,23 +241,25 @@
|
|||||||
<script class="footer" type="text/javascript" src="/libraries/fancybox3/js/wheel.js"></script>
|
<script class="footer" type="text/javascript" src="/libraries/fancybox3/js/wheel.js"></script>
|
||||||
<script class="footer" type="text/javascript" src="/plugins/OwlCarousel/owl.carousel.js"></script>
|
<script class="footer" type="text/javascript" src="/plugins/OwlCarousel/owl.carousel.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
$( function() {
|
||||||
dataLayer.push({
|
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
||||||
event: "view_item",
|
dataLayer.push({
|
||||||
ecommerce: {
|
event: "view_item",
|
||||||
items: [
|
ecommerce: {
|
||||||
{
|
items: [
|
||||||
item_id: "<?= $this -> product -> id;?>",
|
{
|
||||||
item_name: "<?= str_replace( '"', '', $this -> product -> language['name'] );?>",
|
item_id: "<?= $this -> product -> id;?>",
|
||||||
price: '<? if ( $this -> product -> price_brutto_promo ): echo \S::normalize_decimal( $this -> product -> price_brutto_promo ); else: echo \S::normalize_decimal( $this -> product -> price_brutto ); endif;?>',
|
item_name: "<?= str_replace( '"', '', $this -> product -> language['name'] );?>",
|
||||||
quantity: 1,
|
price: '<? if ( $this -> product -> price_brutto_promo ): echo \S::normalize_decimal( $this -> product -> price_brutto_promo ); else: echo \S::normalize_decimal( $this -> product -> price_brutto ); endif;?>',
|
||||||
google_business_vertical: "retail"
|
quantity: 1,
|
||||||
}
|
google_business_vertical: "retail"
|
||||||
],
|
}
|
||||||
value: <? if ( $this -> product -> price_brutto_promo ): echo \S::normalize_decimal( $this -> product -> price_brutto_promo ); else: echo \S::normalize_decimal( $this -> product -> price_brutto ); endif;?>
|
],
|
||||||
}
|
value: <? if ( $this -> product -> price_brutto_promo ): echo \S::normalize_decimal( $this -> product -> price_brutto_promo ); else: echo \S::normalize_decimal( $this -> product -> price_brutto ); endif;?>
|
||||||
});
|
}
|
||||||
<? endif;?>
|
});
|
||||||
|
<? endif;?>
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<script class="footer" type="text/javascript">
|
<script class="footer" type="text/javascript">
|
||||||
$( function ()
|
$( function ()
|
||||||
|
|||||||
Reference in New Issue
Block a user