diff --git a/.gitattributes b/.gitattributes index 7a33f77..730bd21 100644 --- a/.gitattributes +++ b/.gitattributes @@ -252,7 +252,7 @@ changed_full/470-/application/views/azure/tpl/form/user_checkout_noregistration. changed_full/470-/application/views/azure/tpl/form/user_checkout_registration.tpl -text changed_full/470-/application/views/azure/tpl/page/checkout/basket.tpl -text changed_full/470-/modules/d3/d3_googleanalytics/metadata.php -text -changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_footer_main_googleanalytics.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 copy_this/core/smarty/plugins/function.d3getArticleFromOrderArticle.php -text copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics.php -text @@ -263,6 +263,8 @@ copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics copy_this/modules/d3/d3_googleanalytics/d3_googleanalytics_stub.php -text copy_this/modules/d3/d3_googleanalytics/menu.xml -text copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php -text +copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics.php -text +copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_thankyou_googleanalytics.php -text copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics.php -text copy_this/modules/d3/d3_googleanalytics/picture.png -text copy_this/modules/d3/d3_googleanalytics/views/admin/de/d3_googleanalytics_lang.php -text diff --git a/Sources/Google Analytics-Installation.docx b/Sources/Google Analytics-Installation.docx index 4c809be..6d639a2 100644 Binary files a/Sources/Google Analytics-Installation.docx and b/Sources/Google Analytics-Installation.docx differ diff --git a/Sources/ToDo.txt b/Sources/ToDo.txt index 3029d04..e69de29 100644 --- a/Sources/ToDo.txt +++ b/Sources/ToDo.txt @@ -1 +0,0 @@ -Trackingcode wir im plaziert, erlaubt schnelle Verifizierung in WebMasterTools (Tipp von Stefan Sieber (Commodule)) \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/metadata.php b/changed_full/470-/modules/d3/d3_googleanalytics/metadata.php index ef019b9..8633618 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/metadata.php +++ b/changed_full/470-/modules/d3/d3_googleanalytics/metadata.php @@ -38,12 +38,14 @@ $aModule = array( ), 'thumbnail' => 'picture.png', 'version' => '3.0.0.0', - 'author' => 'D³ Data Development', + 'author' => 'D³ Data Development (Inh. Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', 'extend' => array( 'oxcmp_utils' => 'd3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics', 'oxorder' => 'd3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics', + 'order' => 'd3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics', + 'thankyou' => 'd3/d3_googleAnalytics/modules/controllers/d3_thankyou_googleanalytics', ), 'files' => array( 'd3_cfg_googleanalytics' => 'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics.php', @@ -59,11 +61,10 @@ $aModule = array( ), 'events' => array( 'onActivate' => 'd3install::checkUpdateStart', - //'onDeactivate' => 'd3_::onDeactivate' ), 'blocks' => array( - array( 'template' => 'layout/footer.tpl', - 'block'=>'footer_main', - 'file'=>'/views/blocks/layout/d3_footer_main_googleanalytics.tpl'), + array( 'template' => 'layout/base.tpl', + 'block'=>'head_css', + 'file'=>'/views/blocks/layout/d3_base_googleanalytics.tpl'), ), ); \ No newline at end of file diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_footer_main_googleanalytics.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl similarity index 100% rename from changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_footer_main_googleanalytics.tpl rename to changed_full/470-/modules/d3/d3_googleanalytics/views/blocks/layout/d3_base_googleanalytics.tpl 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 d8c935d..112976b 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 @@ -5,6 +5,7 @@ [{assign var="oPayment" value=$order->getPayment()}] [{assign var="oDelSet" value=$order->getDelSet()}] [{assign var="aVoucherSerieList" value=$order->d3getVoucherSerieList()}] + [{assign var="oUser" value=$oView->getUser()}] [{/if}] [{strip}] @@ -108,6 +109,9 @@ [{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}] _gaq.push(['_trackPageview']); diff --git a/copy_this/modules/d3/d3_googleanalytics/d3_googleanalytics_stub.php b/copy_this/modules/d3/d3_googleanalytics/d3_googleanalytics_stub.php index e032385..38754a1 100644 --- a/copy_this/modules/d3/d3_googleanalytics/d3_googleanalytics_stub.php +++ b/copy_this/modules/d3/d3_googleanalytics/d3_googleanalytics_stub.php @@ -20,4 +20,10 @@ class d3_oxcmp_utils_googleAnalytics_parent extends oxcmp_utils {} /** */ -class d3_oxorder_googleanalytics_parent extends oxOrder {} \ No newline at end of file +class d3_oxorder_googleanalytics_parent extends oxOrder {} + +/** */ +class d3_thankyou_googleanalytics_parent extends thankyou {} + +/** */ +class d3_order_googleanalytics_parent extends order {} \ No newline at end of file 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 3eff39c..4ff8ff4 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 @@ -18,7 +18,7 @@ * @copyright (C) D3 Data Development (Inh. Thomas Dartsch) */ -class d3_oxcmp_utils_googleAnalytics extends d3_oxcmp_utils_googleAnalytics_parent +class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_parent { private $_sModId = 'd3_googleanalytics'; diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics.php new file mode 100644 index 0000000..7fc21a9 --- /dev/null +++ b/copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics.php @@ -0,0 +1,38 @@ +. + * + * @link http://www.oxidmodule.com + * @link http://www.shopmodule.com + * @link http://www.aikme.de + * @copyright (C) D3 Data Development (Inh. Thomas Dartsch) & aikme GmbH + */ + +class d3_order_googleanalytics extends d3_order_googleanalytics_parent { + + public function init() + { + parent::init(); + + $this->_d3SetIsNewCustomer(); + } + + protected function _d3SetIsNewCustomer() + { + $oUser = $this->getUser(); + $isNewCustomer = isset($oUser) ? $oUser->inGroup('oxidnotyetordered') : 0 ; + + oxRegistry::getSession()->setVariable('iD3GANewCustomer', (int)$isNewCustomer); + } +} \ No newline at end of file diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_thankyou_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_thankyou_googleanalytics.php new file mode 100644 index 0000000..a2440ca --- /dev/null +++ b/copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_thankyou_googleanalytics.php @@ -0,0 +1,34 @@ +. + * + * @link http://www.oxidmodule.com + * @link http://www.shopmodule.com + * @link http://www.aikme.de + * @copyright (C) D3 Data Development (Inh. Thomas Dartsch) & aikme GmbH + */ + +class d3_thankyou_googleanalytics extends d3_thankyou_googleanalytics_parent +{ + /** + * @return int + */ + public function isNewCustomer() + { + $iIsNewCustomer = oxRegistry::getSession()->getVariable("iD3GANewCustomer"); + oxRegistry::getSession()->deleteVariable("iD3GANewCustomer"); + + return $iIsNewCustomer; + } +} \ No newline at end of file diff --git a/setup+doku/Google Analytics-Installation.pdf b/setup+doku/Google Analytics-Installation.pdf index cb416a0..ca2881b 100644 Binary files a/setup+doku/Google Analytics-Installation.pdf and b/setup+doku/Google Analytics-Installation.pdf differ