add tpl blocks

This commit is contained in:
Daniel Seifert 2017-03-10 08:06:32 +00:00
parent 5d493cca2b
commit 32dd4bd4bb
10 changed files with 520 additions and 497 deletions

View File

@ -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}]

View File

@ -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}]

View File

@ -4,25 +4,27 @@
[{/d3modcfgcheck}]
[{if $mod_d3_googleanalytics && $oD3GASettings->getValue('blD3GAUseOptOut')}]
<div id="d3GAOptOut">
<a href="javascript:gaOptout();">[{oxmultilang ident="D3_GOOGLEANALYTICS_OPTOUT"}]</a>
[{assign var='sGaId' value=$oD3GASettings->getValue('sD3GAId')}]
[{oxscript add="
var gaProperty = '`$sGaId`';
[{block name="BaseOptout"}]
<div id="d3GAOptOut">
<a href="javascript:gaOptout();">[{oxmultilang ident="D3_GOOGLEANALYTICS_OPTOUT"}]</a>
[{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();
}"}]
</div>
if (window[disableStr]) {
$('#d3GAOptOut').remove();
}"}]
</div>
[{/block}]
[{/if}]

View File

@ -7,216 +7,218 @@
[{assign var="oUser" value=$oView->getUser()}]
[{/if}]
[{capture name="d3GATrackCode"}]
[{strip}]
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '[{$oD3GASettings->getValue('sD3GAId')}]']);
[{block name="AsyncAnalytics"}]
[{capture name="d3GATrackCode"}]
[{strip}]
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '[{$oD3GASettings->getValue('sD3GAId')}]']);
[{if $oD3GASettings->getValue('blD3GAAnonymizeIP')}]
_gaq.push(['_gat._anonymizeIp']);
[{/if}]
[{if $oD3GASettings->getValue('sD3GASetDomainName')}]
_gaq.push(['_setDomainName', '[{$oD3GASettings->getValue('sD3GASetDomainName')}]']);
_gaq.push(['_setAllowHash', false]);
[{else}]
_gaq.push(['_setDomainName', 'none']);
[{/if}]
[{if $oD3GASettings->getValue('sD3GASetCookiePath')}]
_gaq.push(['_setCookiePath', '[{$oD3GASettings->getValue('sD3GASetCookiePath')}]']);
[{/if}]
[{if $oD3GASettings->getValue('iD3GASiteSpeedSampleRate')}]
_gaq.push(['_setSiteSpeedSampleRate', [{$oD3GASettings->getValue('iD3GASiteSpeedSampleRate')}]]);
[{/if}]
[{if $oD3GASettings->getValue('iD3GASampleRate')}]
_gaq.push(['_setSampleRate', '[{$oD3GASettings->getValue('iD3GASampleRate')}]']);
[{/if}]
[{if $oD3GASettings->getValue('blD3GAAllowDomainLinker')}]
_gaq.push(['_setAllowLinker', true]);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASetClientInfo')}]
_gaq.push(['_setClientInfo', false]);
[{else}]
_gaq.push(['_setClientInfo', true]);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASetDetectFlash')}]
_gaq.push(['_setDetectFlash', false]);
[{else}]
_gaq.push(['_setDetectFlash', true]);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASetDetectTitle')}]
_gaq.push(['_setDetectTitle', false]);
[{else}]
_gaq.push(['_setDetectTitle', true]);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack')}]
_gaq.push(['_setCampaignTrack', true]);
[{else}]
_gaq.push(['_setCampaignTrack', false]);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampaignCookieTimeout')}]
_gaq.push(['_setCampaignCookieTimeout', '[{$oD3GASettings->getValue('sD3GASetCampaignCookieTimeout')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampNameKey')}]
_gaq.push(['_setCampNameKey', '[{$oD3GASettings->getValue('sD3GASetCampNameKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampMediumKey')}]
_gaq.push(['_setCampMediumKey', '[{$oD3GASettings->getValue('sD3GASetCampMediumKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampSourceKey')}]
_gaq.push(['_setCampSourceKey', '[{$oD3GASettings->getValue('sD3GASetCampSourceKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampTermKey')}]
_gaq.push(['_setCampTermKey', '[{$oD3GASettings->getValue('sD3GASetCampTermKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampContentKey')}]
_gaq.push(['_setCampContentKey', '[{$oD3GASettings->getValue('sD3GASetCampContentKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampContentKey')}]
_gaq.push(['_setCampNOKey', 'ga_nooverride']);
[{/if}]
[{if $oD3GASettings->getValue('blD3GAUseCustomVars')}]
[{**** add custom variables here ****}]
[{if $oxcmp_user}]
_gaq.push(['_setCustomVar',
1, [{*// This custom var is set to slot #1. Required parameter.*}]
'Geschlecht', [{*// The name of the custom variable. Required parameter.*}]
[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]'male'[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]'female'[{/if}],
[{*// The value of the custom variable. Required parameter.*}]
1 [{*// Sets the scope to visitor-level. Optional parameter.*}]
]);
[{if $oD3GASettings->getValue('blD3GAAnonymizeIP')}]
_gaq.push(['_gat._anonymizeIp']);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}]
_gaq.push(['_setCustomVar',2,'Zahlungsart', '[{$oPayment->getFieldData('oxdesc')}]' , 3]);
[{if $oD3GASettings->getValue('sD3GASetDomainName')}]
_gaq.push(['_setDomainName', '[{$oD3GASettings->getValue('sD3GASetDomainName')}]']);
_gaq.push(['_setAllowHash', false]);
[{else}]
_gaq.push(['_setDomainName', 'none']);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}]
_gaq.push(['_setCustomVar',3,'Versandart', '[{$oDelSet->getFieldData('oxtitle')}]' , 3]);
[{if $oD3GASettings->getValue('sD3GASetCookiePath')}]
_gaq.push(['_setCookiePath', '[{$oD3GASettings->getValue('sD3GASetCookiePath')}]']);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}]
[{foreach from=$aVoucherSerieList item="oVoucherSerie"}]
_gaq.push(['_setCustomVar',4,'Gutschein', '[{$oVoucherSerie->getFieldData('oxserienr')}]', 3]);
[{/foreach}]
[{if $oD3GASettings->getValue('iD3GASiteSpeedSampleRate')}]
_gaq.push(['_setSiteSpeedSampleRate', [{$oD3GASettings->getValue('iD3GASiteSpeedSampleRate')}]]);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $order}]
_gaq.push(['_setCustomVar',5,'Waehrung', '[{$order->getFieldData('oxcurrency')}]' , 3]);
[{if $oD3GASettings->getValue('iD3GASampleRate')}]
_gaq.push(['_setSampleRate', '[{$oD3GASettings->getValue('iD3GASampleRate')}]']);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou'}]
_gaq.push(['_setCustomVar',5,'Neukunde', '[{$oView->isNewCustomer()}]',3]);
[{if $oD3GASettings->getValue('blD3GAAllowDomainLinker')}]
_gaq.push(['_setAllowLinker', true]);
[{/if}]
[{/if}]
_gaq.push(['_trackPageview' [{$sD3GASendPageViewParameter}]]);
[{if $oD3GASettings->getValue('blD3GASetClientInfo')}]
_gaq.push(['_setClientInfo', false]);
[{else}]
_gaq.push(['_setClientInfo', true]);
[{/if}]
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
_gaq.push(['_trackPageLoadTime']);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASetDetectFlash')}]
_gaq.push(['_setDetectFlash', false]);
[{else}]
_gaq.push(['_setDetectFlash', true]);
[{/if}]
[{if $oD3GASettings->getValue('sD3GACookiePathCopy')}]
_gaq.push(['_cookiePathCopy', '[{$oD3GASettings->getValue('sD3GACookiePathCopy')}]']);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASetDetectTitle')}]
_gaq.push(['_setDetectTitle', false]);
[{else}]
_gaq.push(['_setDetectTitle', true]);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack')}]
_gaq.push(['_setCampaignTrack', true]);
[{else}]
_gaq.push(['_setCampaignTrack', false]);
[{/if}]
[{assign var="currate" value=$order->oxorder__oxcurrate->value}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampaignCookieTimeout')}]
_gaq.push(['_setCampaignCookieTimeout', '[{$oD3GASettings->getValue('sD3GASetCampaignCookieTimeout')}]']);
[{/if}]
_gaq.push(['_addTrans',
'[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}]
'[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* // affiliation or store name *}]
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
'[{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f"}]', [{* // total - required - has to be gross sum *}]
[{else}]
'[{math equation="s / r" s=$order->getTotalOrderSum() r=$currate format="%.2f"}]', [{* // total - required *}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampNameKey')}]
_gaq.push(['_setCampNameKey', '[{$oD3GASettings->getValue('sD3GASetCampNameKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampMediumKey')}]
_gaq.push(['_setCampMediumKey', '[{$oD3GASettings->getValue('sD3GASetCampMediumKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampSourceKey')}]
_gaq.push(['_setCampSourceKey', '[{$oD3GASettings->getValue('sD3GASetCampSourceKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampTermKey')}]
_gaq.push(['_setCampTermKey', '[{$oD3GASettings->getValue('sD3GASetCampTermKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampContentKey')}]
_gaq.push(['_setCampContentKey', '[{$oD3GASettings->getValue('sD3GASetCampContentKey')}]']);
[{/if}]
[{if !$oD3GASettings->getValue('blD3GASetAdWordsCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampContentKey')}]
_gaq.push(['_setCampNOKey', 'ga_nooverride']);
[{/if}]
[{if $oD3GASettings->getValue('blD3GAUseCustomVars')}]
[{**** add custom variables here ****}]
[{if $oxcmp_user}]
_gaq.push(['_setCustomVar',
1, [{*// This custom var is set to slot #1. Required parameter.*}]
'Geschlecht', [{*// The name of the custom variable. Required parameter.*}]
[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]'male'[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]'female'[{/if}],
[{*// The value of the custom variable. Required parameter.*}]
1 [{*// Sets the scope to visitor-level. Optional parameter.*}]
]);
[{/if}]
'[{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f"}]', [{* // tax *}]
'[{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f"}]', [{* // shipping *}]
'[{$order->oxorder__oxbillcity->value|escape:"quotes"}]', [{* // city *}]
'[{$order->oxorder__oxbillstate->value|escape:"quotes"}]', [{* // state or province *}]
'[{$order->oxorder__oxbillcountry->value|escape:"quotes"}]' [{* // country *}]
]);
[{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}]
_gaq.push(['_setCustomVar',2,'Zahlungsart', '[{$oPayment->getFieldData('oxdesc')}]' , 3]);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}]
_gaq.push(['_setCustomVar',3,'Versandart', '[{$oDelSet->getFieldData('oxtitle')}]' , 3]);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}]
[{foreach from=$aVoucherSerieList item="oVoucherSerie"}]
_gaq.push(['_setCustomVar',4,'Gutschein', '[{$oVoucherSerie->getFieldData('oxserienr')}]', 3]);
[{/foreach}]
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou' && $order}]
_gaq.push(['_setCustomVar',5,'Waehrung', '[{$order->getFieldData('oxcurrency')}]' , 3]);
[{/if}]
[{if $oViewConf->getActiveClassName() == 'thankyou'}]
_gaq.push(['_setCustomVar',5,'Neukunde', '[{$oView->isNewCustomer()}]',3]);
[{/if}]
[{/if}]
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
_gaq.push(['_addItem',
'[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}]
'[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* // SKU/code *}]
'[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* // product name *}]
'[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* // category or variation *}]
[{*'[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* // category or variation *}]
_gaq.push(['_trackPageview' [{$sD3GASendPageViewParameter}]]);
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
_gaq.push(['_trackPageLoadTime']);
[{/if}]
[{if $oD3GASettings->getValue('sD3GACookiePathCopy')}]
_gaq.push(['_cookiePathCopy', '[{$oD3GASettings->getValue('sD3GACookiePathCopy')}]']);
[{/if}]
[{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}]
[{assign var="currate" value=$order->oxorder__oxcurrate->value}]
_gaq.push(['_addTrans',
'[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}]
'[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* // affiliation or store name *}]
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
'[{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f"}]', [{* // total - required - has to be gross sum *}]
[{else}]
'[{math equation="s / r" s=$order->getTotalOrderSum() r=$currate format="%.2f"}]', [{* // total - required *}]
[{/if}]
'[{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f"}]', [{* // tax *}]
'[{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f"}]', [{* // shipping *}]
'[{$order->oxorder__oxbillcity->value|escape:"quotes"}]', [{* // city *}]
'[{$order->oxorder__oxbillstate->value|escape:"quotes"}]', [{* // state or province *}]
'[{$order->oxorder__oxbillcountry->value|escape:"quotes"}]' [{* // country *}]
]);
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
_gaq.push(['_addItem',
'[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}]
'[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* // SKU/code *}]
'[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* // product name *}]
'[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* // category or variation *}]
[{*'[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* // category or variation *}]
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
[{assign var="oPrice" value=$oOrderArticle->getPrice()}]
'[{math equation="s / r" s=$oPrice->getNettoPrice() r=$currate format="%.2f"}]', [{* // unit price - required *}]
[{else}]
[{else}]
'[{$oOrderArticle->oxorderarticles__oxprice->value}]', [{* // unit price - required - is not currency depended *}]
[{/if}]
'[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* // quantity - required *}]
]);
[{/foreach}]
[{/if}]
'[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* // quantity - required *}]
]);
[{/foreach}]
_gaq.push(['_trackTrans']);
_gaq.push(['_trackTrans']);
[{/if}]
[{/if}]
[{* bounce optimization*}]
[{block name="d3ga_bounceoptimization"}]
[{if $oD3GASettings->getValue('blUseBounceRateOptimization')}]
setTimeout('_gaq.push([\'_trackEvent\', \'NoBounce\', \'Over defined seconds\'])',[{$iD3GASendNoBounceEventTime}]);
[{* bounce optimization*}]
[{block name="d3ga_bounceoptimization"}]
[{if $oD3GASettings->getValue('blUseBounceRateOptimization')}]
setTimeout('_gaq.push([\'_trackEvent\', \'NoBounce\', \'Over defined seconds\'])',[{$iD3GASendNoBounceEventTime}]);
[{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}]
window.addEventListener ?
window.addEventListener('scroll', testScroll, false) :
window.attachEvent('onscroll', testScroll);
[{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}]
window.addEventListener ?
window.addEventListener('scroll', testScroll, false) :
window.attachEvent('onscroll', testScroll);
var scrollCount = 0;
function testScroll() {
++scrollCount;
if (scrollCount == 2) {
_gaq.push(['_trackEvent', 'window', 'scrolled']);
var scrollCount = 0;
function testScroll() {
++scrollCount;
if (scrollCount == 2) {
_gaq.push(['_trackEvent', 'window', 'scrolled']);
}
}
}
[{/if}]
[{/if}]
[{/if}]
[{/block}]
[{/block}]
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
[{if $oD3GASettings->getValue('blD3GAUseRemarketing')}]
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
[{else}]
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
[{/if}]
[{if $oD3GASettings->getValue('blD3GAUseRemarketing')}]
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
[{else}]
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
[{/if}]
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
[{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}]

View File

@ -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}]

View File

@ -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}]
<!-- Google Code for Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = [{$oD3GASettings->getValue('sD3GAAdWordConversionId')}];
var google_conversion_language = "de";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "[{$oD3GASettings->getValue('sD3GAAdWordConversionLabel')}]";
var google_conversion_value = [{$sTotal}];
var google_remarketing_only = false;
/* ]]> */
</script>
<!-- Google Code for Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = [{$oD3GASettings->getValue('sD3GAAdWordConversionId')}];
var google_conversion_language = "de";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "[{$oD3GASettings->getValue('sD3GAAdWordConversionLabel')}]";
var google_conversion_value = [{$sTotal}];
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/[{$oD3GASettings->getValue('sD3GAAdWordConversionId')}]/?value=[{$sTotal}]&amp;label=[{$oD3GASettings->getValue('sD3GAAdWordConversionLabel')}]&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
[{/capture}]
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/[{$oD3GASettings->getValue('sD3GAAdWordConversionId')}]/?value=[{$sTotal}]&amp;label=[{$oD3GASettings->getValue('sD3GAAdWordConversionLabel')}]&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
[{/capture}]
[{$oView->logCode($smarty.capture.d3AdWordsCode)}]
[{$oView->logCode($smarty.capture.d3AdWordsCode)}]
[{$smarty.capture.d3AdWordsCode}]
[{$smarty.capture.d3AdWordsCode}]
[{/block}]
[{/if}]
[{/strip}]

View File

@ -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}]

View File

@ -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}]

View File

@ -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
---------------------------------------------------*}]
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: [{$sD3GARemarketingProdId}],
ecomm_pagetype: '[{$sD3GARemarketingPageType}]',
ecomm_totalvalue: '[{$sD3GARemarketingPrice}]'
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = [{$oD3GASettings->getValue('sD3GARemarketingConversionId')}];
[{if $oD3GASettings->getValue('sD3GARemarketingConversionLabel')}]
var google_conversion_label = "[{$oD3GASettings->getValue('sD3GARemarketingConversionLabel')}]";
[{/if}]
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/[{$oD3GASettings->getValue('sD3GARemarketingConversionId')}]/?value=0[{if $oD3GASettings->getValue('sD3GARemarketingConversionLabel')}]&amp;label=[{$oD3GASettings->getValue('sD3GARemarketingConversionLabel')}][{/if}]&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: [{$sD3GARemarketingProdId}],
ecomm_pagetype: '[{$sD3GARemarketingPageType}]',
ecomm_totalvalue: '[{$sD3GARemarketingPrice}]'
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = [{$oD3GASettings->getValue('sD3GARemarketingConversionId')}];
[{if $oD3GASettings->getValue('sD3GARemarketingConversionLabel')}]
var google_conversion_label = "[{$oD3GASettings->getValue('sD3GARemarketingConversionLabel')}]";
[{/if}]
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/[{$oD3GASettings->getValue('sD3GARemarketingConversionId')}]/?value=0[{if $oD3GASettings->getValue('sD3GARemarketingConversionLabel')}]&amp;label=[{$oD3GASettings->getValue('sD3GARemarketingConversionLabel')}][{/if}]&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
[{/block}]
[{/if}]

View File

@ -1,83 +1,87 @@
[{* https://support.google.com/trustedstoresmerchant/answer/6063080?hl=de&ref_topic=6063044 *}]
<!-- BEGIN: Google Certified Shops -->
<script type="text/javascript">
var gts = gts || [];
[{block name="UniversalTrustedStoreBadge"}]
[{* https://support.google.com/trustedstoresmerchant/answer/6063080?hl=de&ref_topic=6063044 *}]
<!-- BEGIN: Google Certified Shops -->
<script type="text/javascript">
var gts = gts || [];
[{if $oD3GASettings->getValue('sD3GATSShoppingActive')}]
gts.push(["id", "[{$oD3GASettings->getValue('sD3GATSId')}]"]);
gts.push(["badge_position", "BOTTOM_RIGHT"]);
gts.push(["locale", "[{$sD3CurrentGTSLang}]"]);
[{if $sD3GATSProdId}]
gts.push(["google_base_offer_id", "[{$sD3GATSProdId}]"]);
[{if $oD3GASettings->getValue('sD3GATSShoppingActive')}]
gts.push(["id", "[{$oD3GASettings->getValue('sD3GATSId')}]"]);
gts.push(["badge_position", "BOTTOM_RIGHT"]);
gts.push(["locale", "[{$sD3CurrentGTSLang}]"]);
[{if $sD3GATSProdId}]
gts.push(["google_base_offer_id", "[{$sD3GATSProdId}]"]);
[{/if}]
gts.push(["google_base_subaccount_id", "[{$oD3GASettings->getValue('sD3GATSShoppingAccountId')}]"]);
gts.push(["google_base_country", "[{$oD3GASettings->getValue('sD3GATSShoppingCountry')|upper}]"]);
gts.push(["google_base_language", "[{$oD3GASettings->getValue('sD3GATSShoppingLanguage')|lower}]"]);
[{/if}]
gts.push(["google_base_subaccount_id", "[{$oD3GASettings->getValue('sD3GATSShoppingAccountId')}]"]);
gts.push(["google_base_country", "[{$oD3GASettings->getValue('sD3GATSShoppingCountry')|upper}]"]);
gts.push(["google_base_language", "[{$oD3GASettings->getValue('sD3GATSShoppingLanguage')|lower}]"]);
[{/if}]
(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);
})();
</script>
<!-- END: Google Certified Shops -->
(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);
})();
</script>
<!-- END: Google Certified Shops -->
[{/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}]
<!-- START Google Trusted Stores Order -->
<div id="gts-order" style="display:none;" translate="no">
<!-- start order and merchant information -->
<span id="gts-o-id">[{$oOrder->getFieldData('oxordernr')}]</span>
<span id="gts-o-domain">[{$oxcmp_shop->oxshops__oxurl->value}]</span>
<span id="gts-o-email">[{$oUser->getFieldData('oxusername')}]</span>
<span id="gts-o-country">[{$oUserCountry->getFieldData('oxisoalpha2')}]</span>
<span id="gts-o-currency">[{$oOrderCurrency->name}]</span>
<span id="gts-o-total">[{$sTotal|string_format:"%.2f"}]</span>
<span id="gts-o-discounts">-[{$oOrder->getFieldData('oxdiscount')|string_format:"%.2f"}]</span>
<span id="gts-o-shipping-total">[{$oOrder->getFieldData('oxdelcost')|string_format:"%.2f"}]</span>
<span id="gts-o-tax-total">[{$oOrder->d3GetTaxTotal()}]</span>
<span id="gts-o-est-delivery-date">[{$oView->d3GAgetEstimatedDeliveryDate()|date_format:"%Y-%m-%d"}]</span>
<span id="gts-o-est-ship-date">[{$oView->d3GAgetEstimatedShippingDate()|date_format:"%Y-%m-%d"}]</span>
<span id="gts-o-has-preorder">[{$oView->d3GAhasBackorderPreorder()}]</span>
<span id="gts-o-has-digital">[{$oView->d3GAhasDigitalGoods()}]</span>
<!-- end order and merchant information -->
<!-- START Google Trusted Stores Order -->
<div id="gts-order" style="display:none;" translate="no">
<!-- start order and merchant information -->
<span id="gts-o-id">[{$oOrder->getFieldData('oxordernr')}]</span>
<span id="gts-o-domain">[{$oxcmp_shop->oxshops__oxurl->value}]</span>
<span id="gts-o-email">[{$oUser->getFieldData('oxusername')}]</span>
<span id="gts-o-country">[{$oUserCountry->getFieldData('oxisoalpha2')}]</span>
<span id="gts-o-currency">[{$oOrderCurrency->name}]</span>
<span id="gts-o-total">[{$sTotal|string_format:"%.2f"}]</span>
<span id="gts-o-discounts">-[{$oOrder->getFieldData('oxdiscount')|string_format:"%.2f"}]</span>
<span id="gts-o-shipping-total">[{$oOrder->getFieldData('oxdelcost')|string_format:"%.2f"}]</span>
<span id="gts-o-tax-total">[{$oOrder->d3GetTaxTotal()}]</span>
<span id="gts-o-est-delivery-date">[{$oView->d3GAgetEstimatedDeliveryDate()|date_format:"%Y-%m-%d"}]</span>
<span id="gts-o-est-ship-date">[{$oView->d3GAgetEstimatedShippingDate()|date_format:"%Y-%m-%d"}]</span>
<span id="gts-o-has-preorder">[{$oView->d3GAhasBackorderPreorder()}]</span>
<span id="gts-o-has-digital">[{$oView->d3GAhasDigitalGoods()}]</span>
<!-- end order and merchant information -->
<!-- start repeated item specific information -->
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
[{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxnprice->value}]
[{else}]
[{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxprice->value}]
[{/if}]
<span class="gts-item">
<span class="gts-i-name">[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]</span>
<span class="gts-i-price">[{$sPrice|string_format:"%.2f"}]</span>
<span class="gts-i-quantity">[{$oOrderArticle->getFieldData('oxamount')}]</span>
[{if $oD3GASettings->getValue('sD3GATSShoppingActive')}]
<span class="gts-i-prodsearch-id">[{$oView->d3GAgetProductId($oOrderArticle)}]</span>
<span class="gts-i-prodsearch-store-id">[{$oD3GASettings->getValue('sD3GATSShoppingAccountId')}]</span>
<span class="gts-i-prodsearch-country">[{$oD3GASettings->getValue('sD3GATSShoppingCountry')|upper}]</span>
<span class="gts-i-prodsearch-language">[{$oD3GASettings->getValue('sD3GATSShoppingLanguage')|lower}]</span>
<!-- start repeated item specific information -->
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
[{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxnprice->value}]
[{else}]
[{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxprice->value}]
[{/if}]
</span>
[{/foreach}]
<!-- end repeated item specific informations -->
</div>
<!-- END Google Trusted Stores Order -->
<span class="gts-item">
<span class="gts-i-name">[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]</span>
<span class="gts-i-price">[{$sPrice|string_format:"%.2f"}]</span>
<span class="gts-i-quantity">[{$oOrderArticle->getFieldData('oxamount')}]</span>
[{if $oD3GASettings->getValue('sD3GATSShoppingActive')}]
<span class="gts-i-prodsearch-id">[{$oView->d3GAgetProductId($oOrderArticle)}]</span>
<span class="gts-i-prodsearch-store-id">[{$oD3GASettings->getValue('sD3GATSShoppingAccountId')}]</span>
<span class="gts-i-prodsearch-country">[{$oD3GASettings->getValue('sD3GATSShoppingCountry')|upper}]</span>
<span class="gts-i-prodsearch-language">[{$oD3GASettings->getValue('sD3GATSShoppingLanguage')|lower}]</span>
[{/if}]
</span>
[{/foreach}]
<!-- end repeated item specific informations -->
</div>
<!-- END Google Trusted Stores Order -->
[{/block}]
[{/if}]