diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleadwordscode.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleadwordscode.tpl index cf930f4..5b39645 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleadwordscode.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleadwordscode.tpl @@ -6,24 +6,25 @@ [{if $mod_d3_googleanalytics}] [{* Content shouldn't rendered in disabled module! Because of this reason, it can't included in d3modcfgcheck block. *}] + [{block name="BaseAdwords"}] + [{if $oD3GASettings->getValue('sD3GATSActive') && $oD3GASettings->getValue('sD3GATSId')}] + [{capture name="d3GATrustedStoreCode"}] + [{strip}] + [{include file="d3ga_universal_trustedstore.tpl"}] + [{/strip}] + [{/capture}] - [{if $oD3GASettings->getValue('sD3GATSActive') && $oD3GASettings->getValue('sD3GATSId')}] - [{capture name="d3GATrustedStoreCode"}] - [{strip}] - [{include file="d3ga_universal_trustedstore.tpl"}] - [{/strip}] - [{/capture}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + [{$oView->logCode($smarty.capture.d3GATrustedStoreCode)}] + [{/if}] - [{if $oViewConf->getActiveClassName() == 'thankyou'}] - [{$oView->logCode($smarty.capture.d3GATrustedStoreCode)}] + [{$smarty.capture.d3GATrustedStoreCode}] [{/if}] - [{$smarty.capture.d3GATrustedStoreCode}] - [{/if}] + [{include file="d3ga_universal_adwordscode.tpl"}] - [{include file="d3ga_universal_adwordscode.tpl"}] + [{include file="d3ga_universal_remarketing.tpl"}] - [{include file="d3ga_universal_remarketing.tpl"}] - - [{include file="d3ga_universal_campaigncode.tpl"}] + [{include file="d3ga_universal_campaigncode.tpl"}] + [{/block}] [{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl index c0508da..d65f5ba 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl @@ -1,14 +1,13 @@ [{$smarty.block.parent}] -[{d3modcfgcheck modid="d3_googleanalytics"}] -[{/d3modcfgcheck}] +[{d3modcfgcheck modid="d3_googleanalytics"}][{/d3modcfgcheck}] [{if $mod_d3_googleanalytics}] - [{* Content shouldn't rendered in disabled module! - Because of this reason, it can't included in d3modcfgcheck block. *}] - [{include file=$sD3GATTpl}] - [{oxstyle include=$oViewConf->getModuleUrl('d3_googleanalytics', 'out/src/d3_googleanalytics.css')}] - [{if $blD3GAIsMobile}] - [{oxstyle include=$oViewConf->getModuleUrl('d3_googleanalytics', 'out/src/d3_googleanalytics_mobile.css')}] - [{/if}] + [{block name="BaseAnalytics"}] + [{include file=$sD3GATTpl}] + [{oxstyle include=$oViewConf->getModuleUrl('d3_googleanalytics', 'out/src/d3_googleanalytics.css')}] + [{if $blD3GAIsMobile}] + [{oxstyle include=$oViewConf->getModuleUrl('d3_googleanalytics', 'out/src/d3_googleanalytics_mobile.css')}] + [{/if}] + [{/block}] [{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_optout.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_optout.tpl index b96d9c2..44cc4d4 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_optout.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_optout.tpl @@ -4,25 +4,27 @@ [{/d3modcfgcheck}] [{if $mod_d3_googleanalytics && $oD3GASettings->getValue('blD3GAUseOptOut')}] -
- [{oxmultilang ident="D3_GOOGLEANALYTICS_OPTOUT"}] - [{assign var='sGaId' value=$oD3GASettings->getValue('sD3GAId')}] - [{oxscript add=" - var gaProperty = '`$sGaId`'; + [{block name="BaseOptout"}] +
+ [{oxmultilang ident="D3_GOOGLEANALYTICS_OPTOUT"}] + [{assign var='sGaId' value=$oD3GASettings->getValue('sD3GAId')}] + [{oxscript add=" + var gaProperty = '`$sGaId`'; - var disableStr = 'ga-disable-' + gaProperty; - if (document.cookie.indexOf(disableStr + '=true') > -1) { - window[disableStr] = true; - } + var disableStr = 'ga-disable-' + gaProperty; + if (document.cookie.indexOf(disableStr + '=true') > -1) { + window[disableStr] = true; + } - function gaOptout() { - document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; - window[disableStr] = true; - $('#d3GAOptOut').remove(); - } + function gaOptout() { + document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; + window[disableStr] = true; + $('#d3GAOptOut').remove(); + } - if (window[disableStr]) { - $('#d3GAOptOut').remove(); - }"}] -
+ if (window[disableStr]) { + $('#d3GAOptOut').remove(); + }"}] +
+ [{/block}] [{/if}] diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl index 1b0e934..1bc4aeb 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl @@ -7,216 +7,218 @@ [{assign var="oUser" value=$oView->getUser()}] [{/if}] - [{capture name="d3GATrackCode"}] - [{strip}] - + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + - [{if (false == $oD3GASettings->getValue('blD3GASetCampaignOnThankyouOnly') || $oViewConf->getActiveClassName() == 'thankyou') && - $oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GACampaignCode')}] - [{$oD3GASettings->getValue('sD3GACampaignCode')}] - [{/if}] - [{/strip}] - [{/capture}] + [{if (false == $oD3GASettings->getValue('blD3GASetCampaignOnThankyouOnly') || $oViewConf->getActiveClassName() == 'thankyou') && + $oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GACampaignCode')}] + [{$oD3GASettings->getValue('sD3GACampaignCode')}] + [{/if}] + [{/strip}] + [{/capture}] - [{if $oViewConf->getActiveClassName() == 'thankyou'}] - [{$oView->logCode($smarty.capture.d3GATrackCode)}] - [{/if}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + [{$oView->logCode($smarty.capture.d3GATrackCode)}] + [{/if}] - [{$smarty.capture.d3GATrackCode}] + [{$smarty.capture.d3GATrackCode}] + [{/block}] [{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwords.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwords.tpl index f62dd15..94f0a76 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwords.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwords.tpl @@ -1,35 +1,39 @@ [{strip}] [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack')}] - [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') - && $oD3GASettings->getValue('sD3GASetCampNameKey')}] - ga('set', 'campaignName', '[{$oD3GASettings->getValue('sD3GASetCampNameKey')}]'); - [{/if}] + [{block name="UniversalAdwordsCampaignOn"}] + [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') + && $oD3GASettings->getValue('sD3GASetCampNameKey')}] + ga('set', 'campaignName', '[{$oD3GASettings->getValue('sD3GASetCampNameKey')}]'); + [{/if}] - [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') - && $oD3GASettings->getValue('sD3GASetCampMediumKey')}] - ga('set', 'campaignMedium', '[{$oD3GASettings->getValue('sD3GASetCampMediumKey')}]'); - [{/if}] + [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') + && $oD3GASettings->getValue('sD3GASetCampMediumKey')}] + ga('set', 'campaignMedium', '[{$oD3GASettings->getValue('sD3GASetCampMediumKey')}]'); + [{/if}] - [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') - && $oD3GASettings->getValue('sD3GASetCampSourceKey')}] - ga('set', 'campaignSource', '[{$oD3GASettings->getValue('sD3GASetCampSourceKey')}]'); - [{/if}] + [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') + && $oD3GASettings->getValue('sD3GASetCampSourceKey')}] + ga('set', 'campaignSource', '[{$oD3GASettings->getValue('sD3GASetCampSourceKey')}]'); + [{/if}] - [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') - && $oD3GASettings->getValue('sD3GASetCampTermKey')}] - ga('set', 'campaignKeyword', '[{$oD3GASettings->getValue('sD3GASetCampTermKey')}]'); - [{/if}] + [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') + && $oD3GASettings->getValue('sD3GASetCampTermKey')}] + ga('set', 'campaignKeyword', '[{$oD3GASettings->getValue('sD3GASetCampTermKey')}]'); + [{/if}] - [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') - && $oD3GASettings->getValue('sD3GASetCampContentKey')}] - ga('set', 'campaignContent', '[{$oD3GASettings->getValue('sD3GASetCampContentKey')}]'); - [{/if}] + [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') + && $oD3GASettings->getValue('sD3GASetCampContentKey')}] + ga('set', 'campaignContent', '[{$oD3GASettings->getValue('sD3GASetCampContentKey')}]'); + [{/if}] - [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') - && $oD3GASettings->getValue('sD3GASetCampIdKey')}] - ga('set', 'campaignId', '[{$oD3GASettings->getValue('sD3GASetCampIdKey')}]'); - [{/if}] + [{if false == $oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') + && $oD3GASettings->getValue('sD3GASetCampIdKey')}] + ga('set', 'campaignId', '[{$oD3GASettings->getValue('sD3GASetCampIdKey')}]'); + [{/if}] + [{/block}] [{else}] - ga('set', 'campaignTrack', false); + [{block name="UniversalAdwordsCampaignOff"}] + ga('set', 'campaignTrack', false); + [{/block}] [{/if}] [{/strip}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwordscode.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwordscode.tpl index 768ca46..a118981 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwordscode.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_adwordscode.tpl @@ -1,42 +1,44 @@ [{strip}][{if $oD3GASettings->getValue('blD3GASetConversionTracking') && $oD3GASettings->getValue('sD3GAAdWordConversionId') && $oViewConf->getActiveClassName() == 'thankyou'}] - [{capture name="d3AdWordsCode"}] - [{assign var="order" value=$oView->getOrder()}] - [{assign var="currate" value=$order->oxorder__oxcurrate->value}] + [{block name="UniversalAdwordsCode"}] + [{capture name="d3AdWordsCode"}] + [{assign var="order" value=$oView->getOrder()}] + [{assign var="currate" value=$order->oxorder__oxcurrate->value}] - [{if $oD3GASettings->getValue('blD3GAUseNetto')}] - [{math equation="s / r" s=$order->getOrderNetSum() r=$currate assign="sTotal"}] [{* // total - required - has to be gross sum *}] - [{else}] - [{math equation="s / r" s=$order->getTotalOrderSum() r=$currate assign="sTotal"}] [{* // total - required *}] - [{/if}] + [{if $oD3GASettings->getValue('blD3GAUseNetto')}] + [{math equation="s / r" s=$order->getOrderNetSum() r=$currate assign="sTotal"}] [{* // total - required - has to be gross sum *}] + [{else}] + [{math equation="s / r" s=$order->getTotalOrderSum() r=$currate assign="sTotal"}] [{* // total - required *}] + [{/if}] - - + + - + - - [{/capture}] + + [{/capture}] - [{$oView->logCode($smarty.capture.d3AdWordsCode)}] + [{$oView->logCode($smarty.capture.d3AdWordsCode)}] - [{$smarty.capture.d3AdWordsCode}] + [{$smarty.capture.d3AdWordsCode}] + [{/block}] [{/if}] [{/strip}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl index 8682155..c2bd24b 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl @@ -9,99 +9,103 @@ [{assign var="iDimensionCount" value=0}] - [{if $oD3GASettings->getValue('blD3GAUseAnalyticsRemarketing')}] - [{* dimension 1 set product ids *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $sD3GARemarketingProdId2}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - [{$sD3GARemarketingProdId2}] - ); - [{/if}] + [{block name="AnalyticsRemarkting"}] + [{if $oD3GASettings->getValue('blD3GAUseAnalyticsRemarketing')}] + [{* dimension 1 set product ids *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $sD3GARemarketingProdId2}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + [{$sD3GARemarketingProdId2}] + ); + [{/if}] - [{* dimension 2 set page type *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $sD3GARemarketingPageType}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{$sD3GARemarketingPageType}]' - ); - [{/if}] + [{* dimension 2 set page type *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $sD3GARemarketingPageType}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$sD3GARemarketingPageType}]' + ); + [{/if}] - [{* dimension 3 set product total price *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $sD3GARemarketingPrice}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{$sD3GARemarketingPrice}]' - ); + [{* dimension 3 set product total price *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $sD3GARemarketingPrice}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$sD3GARemarketingPrice}]' + ); + [{/if}] [{/if}] - [{/if}] + [{/block}] - [{if $oD3GASettings->getValue('blD3GAUseCustomVars')}] - [{* dimension 1 set customer gender *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $oxcmp_user}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]male[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]female[{/if}]' - ); - [{/if}] + [{block name="CustomVars"}] + [{if $oD3GASettings->getValue('blD3GAUseCustomVars')}] + [{* dimension 1 set customer gender *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oxcmp_user}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]male[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]female[{/if}]' + ); + [{/if}] - [{* dimension 2 set payment type *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{$oPayment->getFieldData('oxdesc')}]' - ); - [{/if}] + [{* dimension 2 set payment type *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$oPayment->getFieldData('oxdesc')}]' + ); + [{/if}] - [{* dimension 3 set delivery type *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{$oDelSet->getFieldData('oxtitle')}]' - ); - [{/if}] + [{* dimension 3 set delivery type *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$oDelSet->getFieldData('oxtitle')}]' + ); + [{/if}] - [{* dimension 4 set vouchers *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}] - ga( - 'set', { - [{foreach from=$aVoucherSerieList item="oVoucherSerie"}] - 'dimension[{$iDimensionCount}]' : '[{$oVoucherSerie->getFieldData('oxserienr')}]', - [{/foreach}] - } - ); - [{/if}] + [{* dimension 4 set vouchers *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}] + ga( + 'set', { + [{foreach from=$aVoucherSerieList item="oVoucherSerie"}] + 'dimension[{$iDimensionCount}]' : '[{$oVoucherSerie->getFieldData('oxserienr')}]', + [{/foreach}] + } + ); + [{/if}] - [{* dimension 5 set currency *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $order}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{$order->getFieldData('oxcurrency')}]' - ); - [{/if}] + [{* dimension 5 set currency *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $order}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$order->getFieldData('oxcurrency')}]' + ); + [{/if}] - [{* dimension 6 set new customer status *}] - [{assign var="iDimensionCount" value=$iDimensionCount+1}] - [{if $oViewConf->getActiveClassName() == 'thankyou'}] - ga( - 'set', - 'dimension[{$iDimensionCount}]', - '[{$oView->isNewCustomer()}]' - ); + [{* dimension 6 set new customer status *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$oView->isNewCustomer()}]' + ); + [{/if}] [{/if}] - [{/if}] + [{/block}] [{/strip}][{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl index b11a469..a846f9d 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl @@ -1,44 +1,47 @@ [{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}][{strip}] - [{assign var="order" value=$oView->getOrder()}] + [{block name="UniversalEcommerceOrder"}] + [{assign var="order" value=$oView->getOrder()}] - ga('require', 'ecommerce'); - - [{assign var="currate" value=$order->oxorder__oxcurrate->value}] - [{if $oD3GASettings->getValue('blD3GAUseNetto')}] - [{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f" assign="sTotal"}] [{* // total - required - has to be gross sum *}] - [{else}] - [{math equation="s / r" s=$order->getTotalOrderSum() r=$currate format="%.2f" assign="sTotal"}] [{* // total - required *}] - [{/if}] - [{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f" assign="sTax"}] - [{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f" assign="sShipping"}] - - ga('ecommerce:addTransaction', { - 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}] - 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* Affiliation or store name *}] - 'revenue': '[{$sTotal}]', [{* Gesamtwert *}] - 'shipping': '[{$sShipping}]', [{* Versand *}] - 'tax': '[{$sTax}]' [{* Steuer *}] - }); - - [{foreach from=$order->getOrderArticles() item=oOrderArticle}] + ga('require', 'ecommerce'); + [{assign var="currate" value=$order->oxorder__oxcurrate->value}] [{if $oD3GASettings->getValue('blD3GAUseNetto')}] - [{assign var="oPrice" value=$oOrderArticle->getPrice()}] - [{math equation="s / r" s=$oPrice->getNettoPrice() r=$currate format="%.2f" assign="sPrice"}] + [{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f" assign="sTotal"}] [{* // total - required - has to be gross sum *}] [{else}] - [{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxprice->value}] + [{math equation="s / r" s=$order->getTotalOrderSum() r=$currate format="%.2f" assign="sTotal"}] [{* // total - required *}] [{/if}] + [{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f" assign="sTax"}] + [{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f" assign="sShipping"}] - ga('ecommerce:addItem', { - 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}] - 'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* Produktname *}] - 'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* SKU/Code *}] - 'category': '[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* Kategorie oder Ausführung *}] - [{*'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}] - 'price': '[{$sPrice}]', [{* Preis pro Einheit *}] - 'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}] + ga('ecommerce:addTransaction', { + 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}] + 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* Affiliation or store name *}] + 'revenue': '[{$sTotal}]', [{* Gesamtwert *}] + 'shipping': '[{$sShipping}]', [{* Versand *}] + 'tax': '[{$sTax}]' [{* Steuer *}] }); - [{/foreach}] - ga('ecommerce:send'); + [{foreach from=$order->getOrderArticles() item=oOrderArticle}] + [{block name="UniversalEcommerceOrderArticle"}] + [{if $oD3GASettings->getValue('blD3GAUseNetto')}] + [{assign var="oPrice" value=$oOrderArticle->getPrice()}] + [{math equation="s / r" s=$oPrice->getNettoPrice() r=$currate format="%.2f" assign="sPrice"}] + [{else}] + [{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxprice->value}] + [{/if}] + + ga('ecommerce:addItem', { + 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}] + 'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* Produktname *}] + 'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* SKU/Code *}] + 'category': '[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* Kategorie oder Ausführung *}] + [{*'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}] + 'price': '[{$sPrice}]', [{* Preis pro Einheit *}] + 'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}] + }); + [{/block}] + [{/foreach}] + + ga('ecommerce:send'); + [{/block}] [{/strip}][{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_remarketing.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_remarketing.tpl index d641537..d18a37d 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_remarketing.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_remarketing.tpl @@ -1,35 +1,37 @@ [{if $oD3GASettings->getValue('blD3GASetRemarketing') && $oD3GASettings->getValue('sD3GARemarketingConversionId')}] - [{*-- Google Code für ein Remarketing-Tag -- - -------------------------------------------------- - Remarketing-Tags dürfen nicht mit personenbezogenen Daten verknüpft oder auf Seiten platziert werden, - die sensiblen Kategorien angehören. Weitere Informationen und Anleitungen zur Einrichtung des Tags - erhalten Sie unter: http://google.com/ads/remarketingsetup - ---------------------------------------------------*}] + [{block name="UniversalAdwordsRemarketing"}] + [{*-- Google Code für ein Remarketing-Tag -- + -------------------------------------------------- + Remarketing-Tags dürfen nicht mit personenbezogenen Daten verknüpft oder auf Seiten platziert werden, + die sensiblen Kategorien angehören. Weitere Informationen und Anleitungen zur Einrichtung des Tags + erhalten Sie unter: http://google.com/ads/remarketingsetup + ---------------------------------------------------*}] - - - - + + + + + [{/block}] [{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl index d8a859e..41392f8 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl @@ -1,83 +1,87 @@ -[{* https://support.google.com/trustedstoresmerchant/answer/6063080?hl=de&ref_topic=6063044 *}] - - - + (function() { + var gts = document.createElement("script"); + gts.type = "text/javascript"; + gts.async = true; + gts.src = "https://www.googlecommerce.com/trustedstores/api/js"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(gts, s); + })(); + + +[{/block}] [{if $oViewConf->getActiveClassName() == 'thankyou'}] - [{* https://support.google.com/trustedstoresmerchant/answer/6063087?hl=de&ref_topic=6063044 *}] + [{block name="UniversalTrustedStoreOrderInfo"}] + [{* https://support.google.com/trustedstoresmerchant/answer/6063087?hl=de&ref_topic=6063044 *}] - [{assign var="oOrder" value=$oView->getOrder()}] - [{assign var="oOrderCurrency" value=$oOrder->getOrderCurrency()}] - [{assign var="oUser" value=$oOrder->getOrderUser()}] - [{assign var="oUserCountry" value=$oView->d3GAGetUserCountry()}] - [{if $oD3GASettings->getValue('blD3GAUseNetto')}] - [{assign var="sTotal" value=$oOrder->getOrderNetSum()}] [{* // total - required - has to be gross sum *}] - [{else}] - [{assign var="sTotal" value=$oOrder->getTotalOrderSum()}] [{* // total - required *}] - [{/if}] + [{assign var="oOrder" value=$oView->getOrder()}] + [{assign var="oOrderCurrency" value=$oOrder->getOrderCurrency()}] + [{assign var="oUser" value=$oOrder->getOrderUser()}] + [{assign var="oUserCountry" value=$oView->d3GAGetUserCountry()}] + [{if $oD3GASettings->getValue('blD3GAUseNetto')}] + [{assign var="sTotal" value=$oOrder->getOrderNetSum()}] [{* // total - required - has to be gross sum *}] + [{else}] + [{assign var="sTotal" value=$oOrder->getTotalOrderSum()}] [{* // total - required *}] + [{/if}] - - + + [{/block}] [{/if}] \ No newline at end of file