From a6be04b8c76ea8a4f89286750bee4427f651a394 Mon Sep 17 00:00:00 2001 From: DanielSeifert Date: Fri, 2 May 2014 14:58:43 +0000 Subject: [PATCH] basic implementation --- .gitattributes | 10 +++ .../views/tpl/widget/d3ga_universal.tpl | 64 ++++++++++++++++++ .../widget/inc/d3ga_universal_campaigns.tpl | 25 +++++++ .../tpl/widget/inc/d3ga_universal_create.tpl | 21 ++++++ .../tpl/widget/inc/d3ga_universal_custom.tpl | 65 +++++++++++++++++++ .../widget/inc/d3ga_universal_ecommerce.tpl | 46 +++++++++++++ .../blocks/layout/d3_base_googleanalytics.tpl | 2 +- .../views/tpl/widget/d3ga_universal.tpl | 64 ++++++++++++++++++ .../widget/inc/d3ga_universal_campaigns.tpl | 25 +++++++ .../tpl/widget/inc/d3ga_universal_create.tpl | 21 ++++++ .../tpl/widget/inc/d3ga_universal_custom.tpl | 65 +++++++++++++++++++ .../widget/inc/d3ga_universal_ecommerce.tpl | 46 +++++++++++++ .../d3_cfg_googleanalytics_campaigns.php | 14 +++- .../admin/d3_cfg_googleanalytics_main.php | 15 ++++- .../d3/d3_googleanalytics/metadata.php | 4 ++ .../d3_oxcmp_utils_googleanalytics.php | 64 +++++++++++++++++- .../admin/de/d3_googleanalytics_lang.php | 27 +++++--- .../tpl/d3_cfg_googleanalytics_campaigns.tpl | 25 ++++++- .../admin/tpl/d3_cfg_googleanalytics_main.tpl | 31 +++++++-- 19 files changed, 614 insertions(+), 20 deletions(-) create mode 100644 changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl create mode 100644 changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl create mode 100644 changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl create mode 100644 changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl create mode 100644 changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl create mode 100644 changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl create mode 100644 changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl create mode 100644 changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl create mode 100644 changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl create mode 100644 changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl diff --git a/.gitattributes b/.gitattributes index 4613813..833757f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -157,6 +157,11 @@ changed_full/470-/application/views/azure/tpl/page/checkout/order.tpl -text changed_full/470-/application/views/azure/tpl/page/checkout/payment.tpl -text changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl -text changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl -text +changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl -text +changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl -text +changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl -text +changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl -text +changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl -text changed_full/480-/application/views/azure/tpl/form/login.tpl -text changed_full/480-/application/views/azure/tpl/form/user_checkout_change.tpl -text changed_full/480-/application/views/azure/tpl/form/user_checkout_noregistration.tpl -text @@ -167,6 +172,11 @@ changed_full/480-/application/views/azure/tpl/page/checkout/order.tpl -text changed_full/480-/application/views/azure/tpl/page/checkout/payment.tpl -text changed_full/480-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl -text changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl -text +changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl -text +changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl -text +changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl -text +changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl -text +changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl -text copy_this/.noencode -text copy_this/modules/d3/d3_googleanalytics/IntelliSenseHelper.php -text copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics.php -text diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl new file mode 100644 index 0000000..6de58cc --- /dev/null +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl @@ -0,0 +1,64 @@ +[{if $blD3GoogleAnalyticsActive && $oD3GASettings->getValue('sD3GAId')}] + [{capture name="d3GATrackCode"}] + [{strip}] + + + [{if (!$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}] + + [{$smarty.capture.d3GATrackCode}] +[{/if}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl new file mode 100644 index 0000000..e71bb78 --- /dev/null +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl @@ -0,0 +1,25 @@ +[{strip}] + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampNameKey')}] + ga('set', 'campaignName', '[{$oD3GASettings->getValue('sD3GASetCampNameKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampMediumKey')}] + ga('set', 'campaignMedium', '[{$oD3GASettings->getValue('sD3GASetCampMediumKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampSourceKey')}] + ga('set', 'campaignSource', '[{$oD3GASettings->getValue('sD3GASetCampSourceKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampTermKey')}] + ga('set', 'campaignKeyword', '[{$oD3GASettings->getValue('sD3GASetCampTermKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampContentKey')}] + ga('set', 'campaignContent', '[{$oD3GASettings->getValue('sD3GASetCampContentKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampIdKey')}] + ga('set', 'campaignId', '[{$oD3GASettings->getValue('sD3GASetCampIdKey')}]'); + [{/if}] +[{/strip}] \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl new file mode 100644 index 0000000..06c9881 --- /dev/null +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl @@ -0,0 +1,21 @@ +[{if $oD3GASettings->getValue('sD3GASetDomainName')}] + [{capture name="d3GACreate"}] + [{$smarty.capture.d3GACreate}] + 'cookieDomain': '[{$oD3GASettings->getValue('sD3GASetDomainName')}]', + [{/capture}] +[{/if}] + +$aParameter[] = "'legacyCookieDomain': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetDomainName')."'"; +} +if (d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetCookiePath')) { +$aParameter[] = "'cookiePath': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetCookiePath')."'"; +} +if (d3_cfg_mod::get($this->_sModId)->getValue('blD3GAAllowDomainLinker')) { +$aParameter[] = "'allowLinker': true"; +} + +if (count($aParameter)) { +return ", {".implode(',', $aParameter)."}"; +} + +return ''; \ 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 new file mode 100644 index 0000000..b60f505 --- /dev/null +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl @@ -0,0 +1,65 @@ +[{if $oD3GASettings->getValue('blD3GAUseCustomVars')}] +[{strip}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + [{assign var="order" value=$oView->getOrder()}] + [{assign var="oPayment" value=$order->getPayment()}] + [{assign var="oDelSet" value=$order->getDelSet()}] + [{assign var="aVoucherSerieList" value=$order->d3getVoucherSerieList()}] + [{/if}] + + [{* dimension 1 set customer gender *}] + [{if $oxcmp_user}] + d3ga( + 'set', + 'dimension1', + '[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]male[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]female[{/if}]' + ); + [{/if}] + + [{* dimension 2 set payment type *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}] + d3ga( + 'set', + 'dimension2', + '[{$oPayment->getFieldData('oxdesc')}]' + ); + [{/if}] + + [{* dimension 3 set delivery type *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}] + d3ga( + 'set', + 'dimension3', + '[{$oDelSet->getFieldData('oxtitle')}]' + ); + [{/if}] + + [{* dimension 4 set vouchers *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}] + d3ga( + 'set', { + [{foreach from=$aVoucherSerieList item="oVoucherSerie"}] + 'dimension4' : '[{$oVoucherSerie->getFieldData('oxserienr')}]', + [{/foreach}] + } + ); + [{/if}] + + [{* dimension 5 set currency *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $order}] + d3ga( + 'set', + 'dimension5', + '[{$order->getFieldData('oxcurrency')}]' + ); + [{/if}] + + [{* dimension 6 set new customer status *}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + d3ga( + 'set', + 'dimension6', + '[{$oView->isNewCustomer()}]' + ); + [{/if}] +[{/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 new file mode 100644 index 0000000..bda0d2c --- /dev/null +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl @@ -0,0 +1,46 @@ +[{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}] +[{strip}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + [{assign var="order" value=$oView->getOrder()}] + [{/if}] + + d3ga('require', 'ecommerce', 'ecommerce.js'); + + [{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"}] + + d3ga('ecommerce:addTransaction', { + 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}] + 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value}]', [{* Affiliation or store name *}] + 'revenue': '[{$sTotal}]', [{* Gesamtwert *}] + 'shipping': '[{$sShipping}]', [{* Versand *}] + 'tax': '[{$sTax}]' [{* Steuer *}] + }); + + [{foreach from=$order->getOrderArticles() item=oOrderArticle}] + + [{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}] + + d3ga('ecommerce:addItem', { + 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}] + 'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value}]', [{* Produktname *}] + 'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value}]', [{* SKU/Code *}] + 'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}] + 'price': '[{$sPrice}]', [{* Preis pro Einheit *}] + 'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}] + }); + [{/foreach}] + + d3ga('ecommerce:send'); +[{/strip}][{/if}] \ No newline at end of file diff --git a/changed_full/480-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl b/changed_full/480-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl index daf29bb..fdef014 100644 --- a/changed_full/480-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl +++ b/changed_full/480-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl @@ -1,5 +1,5 @@ [{$smarty.block.parent}] [{d3modcfgcheck modid="d3_googleanalytics"}] - [{include file=$oViewConf->getModulePath('d3_googleanalytics', 'views/tpl/widget/d3_googleanalytics.tpl')}] + [{include file=$sD3GATTpl}] [{/d3modcfgcheck}] \ No newline at end of file diff --git a/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl new file mode 100644 index 0000000..6de58cc --- /dev/null +++ b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl @@ -0,0 +1,64 @@ +[{if $blD3GoogleAnalyticsActive && $oD3GASettings->getValue('sD3GAId')}] + [{capture name="d3GATrackCode"}] + [{strip}] + + + [{if (!$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}] + + [{$smarty.capture.d3GATrackCode}] +[{/if}] \ No newline at end of file diff --git a/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl new file mode 100644 index 0000000..e71bb78 --- /dev/null +++ b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl @@ -0,0 +1,25 @@ +[{strip}] + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampNameKey')}] + ga('set', 'campaignName', '[{$oD3GASettings->getValue('sD3GASetCampNameKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampMediumKey')}] + ga('set', 'campaignMedium', '[{$oD3GASettings->getValue('sD3GASetCampMediumKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampSourceKey')}] + ga('set', 'campaignSource', '[{$oD3GASettings->getValue('sD3GASetCampSourceKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampTermKey')}] + ga('set', 'campaignKeyword', '[{$oD3GASettings->getValue('sD3GASetCampTermKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampContentKey')}] + ga('set', 'campaignContent', '[{$oD3GASettings->getValue('sD3GASetCampContentKey')}]'); + [{/if}] + + [{if !$oD3GASettings->getValue('blD3GASetCampaignTrack') && $oD3GASettings->getValue('sD3GASetCampIdKey')}] + ga('set', 'campaignId', '[{$oD3GASettings->getValue('sD3GASetCampIdKey')}]'); + [{/if}] +[{/strip}] \ No newline at end of file diff --git a/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl new file mode 100644 index 0000000..06c9881 --- /dev/null +++ b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_create.tpl @@ -0,0 +1,21 @@ +[{if $oD3GASettings->getValue('sD3GASetDomainName')}] + [{capture name="d3GACreate"}] + [{$smarty.capture.d3GACreate}] + 'cookieDomain': '[{$oD3GASettings->getValue('sD3GASetDomainName')}]', + [{/capture}] +[{/if}] + +$aParameter[] = "'legacyCookieDomain': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetDomainName')."'"; +} +if (d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetCookiePath')) { +$aParameter[] = "'cookiePath': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetCookiePath')."'"; +} +if (d3_cfg_mod::get($this->_sModId)->getValue('blD3GAAllowDomainLinker')) { +$aParameter[] = "'allowLinker': true"; +} + +if (count($aParameter)) { +return ", {".implode(',', $aParameter)."}"; +} + +return ''; \ No newline at end of file diff --git a/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl new file mode 100644 index 0000000..b60f505 --- /dev/null +++ b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl @@ -0,0 +1,65 @@ +[{if $oD3GASettings->getValue('blD3GAUseCustomVars')}] +[{strip}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + [{assign var="order" value=$oView->getOrder()}] + [{assign var="oPayment" value=$order->getPayment()}] + [{assign var="oDelSet" value=$order->getDelSet()}] + [{assign var="aVoucherSerieList" value=$order->d3getVoucherSerieList()}] + [{/if}] + + [{* dimension 1 set customer gender *}] + [{if $oxcmp_user}] + d3ga( + 'set', + 'dimension1', + '[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]male[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]female[{/if}]' + ); + [{/if}] + + [{* dimension 2 set payment type *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}] + d3ga( + 'set', + 'dimension2', + '[{$oPayment->getFieldData('oxdesc')}]' + ); + [{/if}] + + [{* dimension 3 set delivery type *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}] + d3ga( + 'set', + 'dimension3', + '[{$oDelSet->getFieldData('oxtitle')}]' + ); + [{/if}] + + [{* dimension 4 set vouchers *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}] + d3ga( + 'set', { + [{foreach from=$aVoucherSerieList item="oVoucherSerie"}] + 'dimension4' : '[{$oVoucherSerie->getFieldData('oxserienr')}]', + [{/foreach}] + } + ); + [{/if}] + + [{* dimension 5 set currency *}] + [{if $oViewConf->getActiveClassName() == 'thankyou' && $order}] + d3ga( + 'set', + 'dimension5', + '[{$order->getFieldData('oxcurrency')}]' + ); + [{/if}] + + [{* dimension 6 set new customer status *}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + d3ga( + 'set', + 'dimension6', + '[{$oView->isNewCustomer()}]' + ); + [{/if}] +[{/strip}][{/if}] \ No newline at end of file diff --git a/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl new file mode 100644 index 0000000..bda0d2c --- /dev/null +++ b/changed_full/480-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl @@ -0,0 +1,46 @@ +[{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}] +[{strip}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + [{assign var="order" value=$oView->getOrder()}] + [{/if}] + + d3ga('require', 'ecommerce', 'ecommerce.js'); + + [{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"}] + + d3ga('ecommerce:addTransaction', { + 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}] + 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value}]', [{* Affiliation or store name *}] + 'revenue': '[{$sTotal}]', [{* Gesamtwert *}] + 'shipping': '[{$sShipping}]', [{* Versand *}] + 'tax': '[{$sTax}]' [{* Steuer *}] + }); + + [{foreach from=$order->getOrderArticles() item=oOrderArticle}] + + [{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}] + + d3ga('ecommerce:addItem', { + 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}] + 'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value}]', [{* Produktname *}] + 'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value}]', [{* SKU/Code *}] + 'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}] + 'price': '[{$sPrice}]', [{* Preis pro Einheit *}] + 'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}] + }); + [{/foreach}] + + d3ga('ecommerce:send'); +[{/strip}][{/if}] \ No newline at end of file diff --git a/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_campaigns.php b/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_campaigns.php index 1540c6e..454e2aa 100644 --- a/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_campaigns.php +++ b/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_campaigns.php @@ -23,4 +23,16 @@ class d3_cfg_googleanalytics_campaigns extends d3_cfg_mod_main protected $_sThisTemplate = 'd3_cfg_googleanalytics_campaigns.tpl'; protected $_sModId = 'd3_googleanalytics'; -} \ No newline at end of file + + /** + * @return mixed + */ + public function getGaType() + { + if ($this->d3GetSet()->getValue('sD3GAType') == 'async') { + return 'async'; + } + + return 'universal'; + } +} diff --git a/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_main.php b/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_main.php index acaf608..13d8bdc 100644 --- a/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_main.php +++ b/copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_main.php @@ -22,4 +22,17 @@ class d3_cfg_googleanalytics_main extends d3_cfg_mod_main { protected $_sThisTemplate = 'd3_cfg_googleanalytics_main.tpl'; protected $_sModId = 'd3_googleanalytics'; -} \ No newline at end of file + protected $_blHasDebugSwitch = true; + + /** + * @return mixed + */ + public function getGaType() + { + if ($this->d3GetSet()->getValue('sD3GAType') == 'async') { + return 'async'; + } + + return 'universal'; + } +} diff --git a/copy_this/modules/d3/d3_googleanalytics/metadata.php b/copy_this/modules/d3/d3_googleanalytics/metadata.php index 12d2c3f..db1ff53 100644 --- a/copy_this/modules/d3/d3_googleanalytics/metadata.php +++ b/copy_this/modules/d3/d3_googleanalytics/metadata.php @@ -58,6 +58,10 @@ $aModule = array( ), 'templates' => array( 'd3_googleanalytics.tpl' => 'd3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl', + 'd3ga_universal.tpl' => 'd3/d3_googleanalytics/views/tpl/widget/d3ga_universal.tpl', + 'd3ga_universal_custom.tpl' => 'd3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl', + 'd3ga_universal_ecommerce.tpl' => 'd3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl', + 'd3ga_universal_campaigns.tpl' => 'd3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigns.tpl', 'd3_cfg_googleanalytics_main.tpl' => 'd3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl', 'd3_cfg_googleanalytics_campaigns.tpl' => 'd3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl', ), diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php index bba2db5..64c2a99 100644 --- a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php +++ b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php @@ -33,6 +33,9 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare $oParentView = $this->getParent(); $oParentView->addTplParam('blD3GoogleAnalyticsActive', d3_cfg_mod::get($this->_d3getModId())->isActive()); $oParentView->addTplParam('oD3GASettings', d3_cfg_mod::get($this->_d3getModId())); + $oParentView->addTplParam('sD3GATTpl', $this->d3getGATTpl()); + $oParentView->addTplParam('sD3GACreateParameter', $this->d3getCreateParameters()); + $oParentView->addTplParam('sD3GASendPageViewParameter', $this->d3getSendPageViewParameters()); return $ret; } @@ -44,4 +47,63 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare { return $this->_sModId; } -} \ No newline at end of file + + /** + * @return string + */ + public function d3getGATTpl() + { + if (d3_cfg_mod::get($this->_sModId)->getValue('sD3GAType') == 'async') { + return 'd3_googleanalytics.tpl'; + } + + return 'd3ga_universal.tpl'; + } + + /** + * @return string + */ + public function d3getCreateParameters() + { + $aParameter = array(); + + if (d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetDomainName')) { + $aParameter[] = "'cookieDomain': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetDomainName')."'"; + $aParameter[] = "'legacyCookieDomain': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetDomainName')."'"; + } + if (d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetCookiePath')) { + $aParameter[] = "'cookiePath': '".d3_cfg_mod::get($this->_sModId)->getValue('sD3GASetCookiePath')."'"; + } + if (d3_cfg_mod::get($this->_sModId)->getValue('blD3GAAllowDomainLinker')) { + $aParameter[] = "'allowLinker': true"; + } + + if (count($aParameter)) { + return ", {".implode(',', $aParameter)."}"; + } + + return ''; + } + + /** + * @return string + */ + public function d3getSendPageViewParameters() + { + $aParameter = array(); + + if (d3_cfg_mod::get($this->_sModId)->hasDebugMode()) { + $aParameter[] = " + 'hitCallback': function() { + alert('analytics.js done sending data'); + } + "; + } + + if (count($aParameter)) { + return ", {".implode(',', $aParameter)."}"; + } + + return ''; + } +} diff --git a/copy_this/modules/d3/d3_googleanalytics/views/admin/de/d3_googleanalytics_lang.php b/copy_this/modules/d3/d3_googleanalytics/views/admin/de/d3_googleanalytics_lang.php index eb8e11d..aa712ff 100644 --- a/copy_this/modules/d3/d3_googleanalytics/views/admin/de/d3_googleanalytics_lang.php +++ b/copy_this/modules/d3/d3_googleanalytics/views/admin/de/d3_googleanalytics_lang.php @@ -35,6 +35,13 @@ $aLang = array( 'D3_GOOGLEANALYTICS_CFG_TITLE' => 'Google Analytics Schnittstelle - Einstellungen', 'D3_GOOGLEANALYTICS_MAIN' => 'Grundeinstellungen', + 'D3_GOOGLEANALYTICS_MAIN_GATYPE' => 'TrackingCode-Typ', + 'D3_GOOGLEANALYTICS_MAIN_GATYPE_UNIVERSAL' => 'Universal', + 'D3_GOOGLEANALYTICS_MAIN_GATYPE_ASYNC' => 'asynchron', + 'D3_GOOGLEANALYTICS_MAIN_GATYPE_DESC' => 'Aktuell priorisiert Google den Trackingtyp '. + '"Universal". Setzen Sie hier den Typ, den Sie in Ihrem Analytics-Konto auch verwenden. Nutzen Sie noch den '. + 'asynchronen Trackingcode, lesen Sie vor der Umstellung den Leitfaden zum Wechsel.', 'D3_GOOGLEANALYTICS_MAIN_GAID' => 'Analyics-ID', 'D3_GOOGLEANALYTICS_MAIN_GAID_DESC' => 'Fügen Sie hier die Google Analytics Konto-ID ein. Diese finden Sie in Ihrem GA-Konto und beginnt im Normalfall mit "UA-".', 'D3_GOOGLEANALYTICS_MAIN_ANONYMIZEIP' => 'IP-Adressen anonymisiert übertragen (dringend empfohlen)', @@ -42,7 +49,7 @@ $aLang = array( 'D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME' => 'Seitenladezeit mit übertragen', 'D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME_DESC' => 'Die Ladezeit Ihrer Seite ist, speziell auch in Hinblick auf verschiedene Länder, durchaus ein Faktor, der in das Ranking Ihrer Page einfliesst.', 'D3_GOOGLEANALYTICS_MAIN_USEREMARKETING' => 'Remarketing verwenden', - 'D3_GOOGLEANALYTICS_MAIN_USEREMARKETING_DESC' => 'Wenn Sie sich entschließen, Remarketing mit Google Analytics zu nutzen, setzen Sie diesen Haken. Nachdem Sie diese Änderung vorgenommen haben, erfasst und analysiert Google Analytics neben den üblichen Informationen auch das DoubleClick-Cookie, sofern vorhanden. Das DoubleClick-Cookie ermöglicht Remarketing im Google Display-Netzwerk für Produkte wie AdWords.', + 'D3_GOOGLEANALYTICS_MAIN_USEREMARKETING_DESC' => 'Wenn Sie sich entschließen, Remarketing mit Google Analytics zu nutzen, setzen Sie diesen Haken. Nachdem Sie diese Änderung vorgenommen haben, erfasst und analysiert Google Analytics neben den üblichen Informationen auch das DoubleClick-Cookie, sofern vorhanden. Das DoubleClick-Cookie ermöglicht Remarketing im Google Display-Netzwerk für Produkte wie AdWords.
Beachten Sie, dass Remarketing in Verbindung mit Universal Analytics zum Zeitpunkt der Modulerstellung nicht kompatibel war. Konsultieren Sie hierzu die Dokumentation.', 'D3_GOOGLEANALYTICS_ECOMMERCE' => 'eCommerce-Einstellungen', 'D3_GOOGLEANALYTICS_ECOMMERCE_SENDDATA' => 'eCommerce-Daten übertragen', @@ -52,7 +59,7 @@ $aLang = array( 'D3_GOOGLEANALYTICS_DOMAIN' => 'Multi-Domain-Einstellungen', 'D3_GOOGLEANALYTICS_DOMAIN_SETALLOWLINKER' => 'Trackingdaten von unterschiedlichen Domains verwenden', - 'D3_GOOGLEANALYTICS_DOMAIN_SETALLOWLINKER_DESC' => 'Cross Domain Tracking erlaubt das Sammeln von Trackinginformationen auch über verschiedene Domains hinweg.

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_DOMAIN_SETALLOWLINKER_DESC' => 'Cross Domain Tracking erlaubt das Sammeln von Trackinginformationen auch über verschiedene Domains hinweg.

Weitere Informationen finden Sie hier.', 'D3_GOOGLEANALYTICS_DOMAIN_SETDOMAINNAME' => 'fixiert das Tracking-Cookie auf die angegebene Domain (optional)', 'D3_GOOGLEANALYTICS_DOMAIN_SETDOMAINNAME_DESC' => 'Lassen Sie dieses Feld leer, ist das Tacking-Cookie für unterschiedliche Seiten gültig. Wenn Sie statt dessen eine Domain angeben, ist das gesetzte Cookie nur für Seiten unter dieser Domain gültig. Andere zu trackende Seiten setzen dann ein neues Cookie.

Der Eintrag sollte hier so aussehen: .yourDomainName.com

Weitere Informationen finden Sie hier.', 'D3_GOOGLEANALYTICS_DOMAIN_SETCOOKIEPATH' => 'Tracking nur auf ein Verzeichnis beschränken (optional)', @@ -81,26 +88,28 @@ $aLang = array( 'D3_GOOGLEANALYTICS_ADWORDSCODE_SETCAMPAIGNTHANKYOUONLY' => 'Kampagnendaten nur in Bestellabschlussseite verwenden', 'D3_GOOGLEANALYTICS_ADWORDSCODE_SETCAMPAIGNTHANKYOUONLY_DESC' => 'Ist dieser Haken nicht gesetzt, wird der Kampagnencode shopweit eingefügt. Das AdWords-Conversion Tracking erwartet die Daten jedoch nur bei Bestellabschluss. Ob diese Einstellung notwendig ist, erfahren Sie bei Ihrem Conversion Tracking Anbieter.', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT' => 'Kampagnenlaufzeit (optional, sonst 6 Monate)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT_DESC' => 'Geben Sie hier eine optionale Laufzeit dieser Kampagne in Millisekunden an.

30 Tage = 2592000000
365 Tage = 31536000000', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT_DESC' => 'Geben Sie hier eine optionale Laufzeit dieser Kampagne in Millisekunden an.

30 Tage = 2592000000
365 Tage = 31536000000

Für Universal Analytics tragen Sie diesen Wert bitte in Ihrem Analytics-Konto nach.', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT_MS' => 'Millisekunden', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNOKEY' => 'zwingend verwendete Kampagne (optional)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNOKEY_DESC' => 'die hier festgelegte Kampagne wird zwingend verwendet, auch wenn die Cookie-Einstellungen schon eine andere Kampagne liefern.

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNOKEY_DESC' => 'die hier festgelegte Kampagne wird zwingend verwendet, auch wenn die Cookie-Einstellungen schon eine andere Kampagne liefern.', 'D3_GOOGLEANALYTICS_ADWORDSCODE' => 'Kampagnen-Code', 'D3_GOOGLEANALYTICS_ADWORDSCODE_CODE' => 'AdWords-Code', 'D3_GOOGLEANALYTICS_ADWORDSCODE_CODE_DESC' => 'Kopieren Sie hier den Kampagnen-Tracking-Code ein, den Sie auf Ihrer AdWords-Seite finden. Kopieren Sie auch das "script"-Tag mit.', 'D3_GOOGLEANALYTICS_ADWORDSMAIN' => 'Individualisierung der Kampagnentrackings', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPIDKEY' => 'Kampagnen-ID (optional)', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPIDKEY_DESC' => 'Geben Sie hier die ID dieser Kamapagne an.

Weitere Informationen finden Sie hier: Diese Angabe ist nur in Universal Analytics verfügbar.', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNAMEKEY' => 'Kampagnenname (optional)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNAMEKEY_DESC' => 'Unter diesem Namen sehen Sie die Auswertung der Daten aus dieser Shopkampagne in Analytics.

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNAMEKEY_DESC' => 'Unter diesem Namen sehen Sie die Auswertung der Daten aus dieser Shopkampagne in Analytics.

Weitere Informationen finden Sie hier: ', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPMEDIUMKEY' => 'Kampagnenmedium (optional)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPMEDIUMKEY_DESC' => 'Definieren Sie das Medium dieser Kampagne (z.B. Werbebanner, Mailkampagne oder auch Klickkampagne). Diese Einstellung finden Sie in der Kampagnenauswertung unter "Keywords".

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPMEDIUMKEY_DESC' => 'Definieren Sie das Medium dieser Kampagne (z.B. Werbebanner, Mailkampagne oder auch Klickkampagne). Diese Einstellung finden Sie in der Kampagnenauswertung unter "Keywords".

Weitere Informationen finden Sie hier: ', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPSOURCEKEY' => 'Kampagnenquelle (optional)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPSOURCEKEY_DESC' => 'Benennen Sie hier die Quelle der Shopkampagne, vergeben Sie zum Beispiel den Webseiten-Name oder den Firmenname.

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPSOURCEKEY_DESC' => 'Benennen Sie hier die Quelle der Shopkampagne, vergeben Sie zum Beispiel den Webseiten-Name oder den Firmenname.

Weitere Informationen finden Sie hier: ', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPTERMKEY' => 'Schlüsselwort(e) Ihrer Kampagne (optional)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPTERMKEY_DESC' => 'Auch diese Keywords erscheinen in Analytics unter "Keywords".

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPTERMKEY_DESC' => 'Auch diese Keywords erscheinen in Analytics unter "Keywords".

Weitere Informationen finden Sie hier: ', 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPCONTENTKEY' => 'Inhaltsbeschreibung der Kampagne (optional)', - 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPCONTENTKEY_DESC' => 'Den beschrieben Inhalt finden Sie in der Auswertung als "Ad Content".

Weitere Informationen finden Sie hier.', + 'D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPCONTENTKEY_DESC' => 'Den beschrieben Inhalt finden Sie in der Auswertung als "Ad Content".

Weitere Informationen finden Sie hier: ', 'D3_GOOGLEANALYTICS_METADATA_TITLE' => 'Google Analytics Schnittstelle', 'D3_GOOGLEANALYTICS_METADATA_DESC' => 'Dieses Modul stellt Ihnen die schnelle und unkomplizierte Einbindung Ihres Google-Analytics-Kontos in Ihren Shop zur Verfügung. Hierbei werden über standardisierte Schnittstellen die Besucherdaten und eCommerce-Daten zu Google übertragen.Ebenfalls übermittelt werden Daten der Website-Suche. Dem Modul liegen angepaßte Templates bei, mit denen auch die Trichter ordentlich protokolliert werden.', diff --git a/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl b/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl index 764af1b..62522fb 100644 --- a/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl +++ b/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl @@ -101,6 +101,17 @@ function _groupExp(el) { [{else}] + [{if $oView->getGaType() == 'universal'}] + [{assign var="blUniversalDisabled" value="disabled readonly"}] + [{assign var="blAsyncDisabled" value=""}] + [{elseif $oView->getGaType() == 'async'}] + [{assign var="blUniversalDisabled" value=""}] + [{assign var="blAsyncDisabled" value="disabled readonly"}] + [{else}] + [{assign var="blUniversalDisabled" value=""}] + [{assign var="blAsyncDisabled" value=""}] + [{/if}] +
@@ -135,7 +146,7 @@ function _groupExp(el) { [{* _gaq.push(['_setCampaignCookieTimeout', 31536000000]); *}]
- [{oxmultilang ident="D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT_MS"}] + [{oxmultilang ident="D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT_MS"}] [{ oxinputhelp ident="D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPAIGNCOOKIETIMEOUT_DESC" }]
@@ -146,7 +157,7 @@ function _groupExp(el) {
- getValue('blD3GASetCampNoKey')}]checked[{/if}] name="value[blD3GASetCampNoKey]"> + getValue('blD3GASetCampNoKey')}]checked[{/if}] name="value[blD3GASetCampNoKey]"> [{ oxinputhelp ident="D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPNOKEY_DESC" }]
@@ -181,6 +192,16 @@ function _groupExp(el) { [{oxmultilang ident="D3_GOOGLEANALYTICS_ADWORDSMAIN"}]
+
+
+ +[{* _gaq.push(['_setCampId', 'ga_content']); *}] +
+
+ + [{ oxinputhelp ident="D3_GOOGLEANALYTICS_ADWORDSMAIN_SETCAMPIDKEY_DESC" }] +
+
diff --git a/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl b/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl index 52cfc6c..f3855a0 100644 --- a/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl +++ b/copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl @@ -105,6 +105,17 @@
[{else}] + [{if $oView->getGaType() == 'universal'}] + [{assign var="blUniversalDisabled" value="disabled readonly"}] + [{assign var="blAsyncDisabled" value=""}] + [{elseif $oView->getGaType() == 'async'}] + [{assign var="blUniversalDisabled" value=""}] + [{assign var="blAsyncDisabled" value="disabled readonly"}] + [{else}] + [{assign var="blUniversalDisabled" value=""}] + [{assign var="blAsyncDisabled" value=""}] + [{/if}] +
@@ -112,6 +123,16 @@ [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN"}] +
+
+ +
+
+ getGaType() != 'async'}]checked[{/if}]> [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_GATYPE_UNIVERSAL"}]
+ getGaType() == 'async'}]checked[{/if}]> [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_GATYPE_ASYNC"}] + [{ oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_GATYPE_DESC" }] +
+
@@ -150,7 +171,7 @@
- getValue('blD3GAUseRemarketing')}]checked[{/if}] name="value[blD3GAUseRemarketing]"> + getValue('blD3GAUseRemarketing')}]checked[{/if}] name="value[blD3GAUseRemarketing]"> [{ oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_USEREMARKETING_DESC" }]
@@ -232,7 +253,7 @@ [{* _gaq.push(['_cookiePathCopy', '/path/of/cookie/']); *}]
- + [{ oxinputhelp ident="D3_GOOGLEANALYTICS_DOMAIN_COOKIEPATHCOPY_DESC" }]
@@ -253,7 +274,7 @@
- getValue('blD3GASetClientInfo')}]checked[{/if}] name="value[blD3GASetClientInfo]"> + getValue('blD3GASetClientInfo')}]checked[{/if}] name="value[blD3GASetClientInfo]"> [{ oxinputhelp ident="D3_GOOGLEANALYTICS_BROWSER_SETCLIENTINFO_DESC" }]
@@ -264,7 +285,7 @@
- getValue('blD3GASetDetectFlash')}]checked[{/if}] name="value[blD3GASetDetectFlash]"> + getValue('blD3GASetDetectFlash')}]checked[{/if}] name="value[blD3GASetDetectFlash]"> [{ oxinputhelp ident="D3_GOOGLEANALYTICS_BROWSER_SETDETECTFLASH_DESC" }]
@@ -275,7 +296,7 @@
- getValue('blD3GASetDetectTitle')}]checked[{/if}] name="value[blD3GASetDetectTitle]"> + getValue('blD3GASetDetectTitle')}]checked[{/if}] name="value[blD3GASetDetectTitle]"> [{ oxinputhelp ident="D3_GOOGLEANALYTICS_BROWSER_SETDETECTTITLE_DESC" }]