This commit is contained in:
Daniel Seifert 2013-02-21 13:51:41 +00:00
parent 2bb5592b87
commit 2c34558c8d
11 changed files with 93 additions and 9 deletions

4
.gitattributes vendored
View File

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

View File

@ -1 +0,0 @@
Trackingcode wir im <head> plaziert, erlaubt schnelle Verifizierung in WebMasterTools (Tipp von Stefan Sieber (Commodule))

View File

@ -38,12 +38,14 @@ $aModule = array(
),
'thumbnail' => 'picture.png',
'version' => '3.0.0.0',
'author' => 'D&sup3; Data Development',
'author' => 'D&sup3; 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'),
),
);

View File

@ -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']);

View File

@ -20,4 +20,10 @@
class d3_oxcmp_utils_googleAnalytics_parent extends oxcmp_utils {}
/** */
class d3_oxorder_googleanalytics_parent extends oxOrder {}
class d3_oxorder_googleanalytics_parent extends oxOrder {}
/** */
class d3_thankyou_googleanalytics_parent extends thankyou {}
/** */
class d3_order_googleanalytics_parent extends order {}

View File

@ -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';

View File

@ -0,0 +1,38 @@
<?php
/**
* This module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For further informations, see <http://www.gnu.org/licenses/>.
*
* @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);
}
}

View File

@ -0,0 +1,34 @@
<?php
/**
* This module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For further informations, see <http://www.gnu.org/licenses/>.
*
* @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;
}
}