From a41aed77b54411cbca217bdeaa677d70d639b4f4 Mon Sep 17 00:00:00 2001 From: DanielSeifert Date: Fri, 10 Feb 2017 12:47:37 +0000 Subject: [PATCH] add remarkting (via Analytics) --- .../tpl/widget/inc/d3ga_universal_custom.tpl | 140 ++++++++++++------ .../d3/d3_googleanalytics/metadata.php | 2 +- .../d3_oxcmp_utils_googleanalytics.php | 2 +- .../setup/d3_googleanalytics_update.php | 16 +- .../admin/de/d3_googleanalytics_lang.php | 13 +- .../admin/en/d3_googleanalytics_lang.php | 23 ++- .../admin/tpl/d3_cfg_googleanalytics_main.tpl | 20 +++ setup+doku/changelog.txt | 3 + 8 files changed, 150 insertions(+), 69 deletions(-) diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl index 37ddd73..0c87954 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl @@ -1,4 +1,4 @@ -[{if $oD3GASettings->getValue('blD3GAUseCustomVars')}] +[{if $oD3GASettings->getValue('blD3GAUseAnalyticsRemarketing') || $oD3GASettings->getValue('blD3GAUseCustomVars')}] [{strip}] [{if $oViewConf->getActiveClassName() == 'thankyou'}] [{assign var="order" value=$oView->getOrder()}] @@ -7,59 +7,101 @@ [{assign var="aVoucherSerieList" value=$order->d3getVoucherSerieList()}] [{/if}] - [{* dimension 1 set customer gender *}] - [{if $oxcmp_user}] - ga( - 'set', - 'dimension1', - '[{if $oxcmp_user->oxuser__oxsal->value == 'MR'}]male[{elseif $oxcmp_user->oxuser__oxsal->value == 'MRS'}]female[{/if}]' - ); + [{assign var="iDimensionCount" value=0}] + + [{if $oD3GASettings->getValue('blD3GAUseAnalyticsRemarketing')}] + [{* dimension 2 set payment type *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + [{$sD3GARemarketingProdId}] + ); + [{/if}] + + [{* dimension 2 set payment type *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$sD3GARemarketingPageType}]' + ); + [{/if}] + + [{* dimension 2 set payment type *}] + [{assign var="iDimensionCount" value=$iDimensionCount+1}] + [{if $oViewConf->getActiveClassName() == 'thankyou'}] + ga( + 'set', + 'dimension[{$iDimensionCount}]', + '[{$sD3GARemarketingPrice}]' + ); + [{/if}] [{/if}] - [{* dimension 2 set payment type *}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $oPayment}] - ga( - 'set', - 'dimension2', - '[{$oPayment->getFieldData('oxdesc')}]' - ); - [{/if}] + [{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 3 set delivery type *}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $oDelSet}] - ga( - 'set', - 'dimension3', - '[{$oDelSet->getFieldData('oxtitle')}]' - ); - [{/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 4 set vouchers *}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $aVoucherSerieList}] - ga( - 'set', { - [{foreach from=$aVoucherSerieList item="oVoucherSerie"}] - 'dimension4' : '[{$oVoucherSerie->getFieldData('oxserienr')}]', - [{/foreach}] - } - ); - [{/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 5 set currency *}] - [{if $oViewConf->getActiveClassName() == 'thankyou' && $order}] - ga( - 'set', - 'dimension5', - '[{$order->getFieldData('oxcurrency')}]' - ); - [{/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 6 set new customer status *}] - [{if $oViewConf->getActiveClassName() == 'thankyou'}] - ga( - 'set', - 'dimension6', - '[{$oView->isNewCustomer()}]' - ); + [{* 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()}]' + ); + [{/if}] [{/if}] [{/strip}][{/if}] \ No newline at end of file diff --git a/copy_this/modules/d3/d3_googleanalytics/metadata.php b/copy_this/modules/d3/d3_googleanalytics/metadata.php index 946421b..8981be0 100644 --- a/copy_this/modules/d3/d3_googleanalytics/metadata.php +++ b/copy_this/modules/d3/d3_googleanalytics/metadata.php @@ -40,7 +40,7 @@ $aModule = array( 'Trusted Shops account to your shop.', ), 'thumbnail' => 'picture.png', - 'version' => '3.3.2.0', + 'version' => '3.3.3.0', 'author' => 'D³ Data Development (Inh. Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', 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 0de8f07..d8eb93b 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 @@ -64,7 +64,7 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare $oParentView->addTplParam('sD3GATSProdId', $this->d3GATSGetProdIdList($aInfos['aArtIdList'])); } - if ($oSet->getValue('blD3GASetRemarketing')) { + if ($oSet->getValue('blD3GASetRemarketing') || $oSet->getValue('blD3GAUseAnalyticsRemarketing')) { $aInfos = $this->d3GetGAProdInfos(); $oParentView->addTplParam('sD3GARemarketingProdId', $this->d3GetGAProdIdList($aInfos['aArtIdList'])); $oParentView->addTplParam( diff --git a/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php b/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php index 644b04b..ea349d2 100644 --- a/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php +++ b/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php @@ -21,18 +21,18 @@ class d3_googleanalytics_update extends d3install_updatebase public $sModName = 'Google Services Schnittstelle'; - public $sModVersion = '3.3.2.0'; + public $sModVersion = '3.3.3.0'; - public $sModRevision = '228'; + public $sModRevision = '237'; // heredoc syntax using for class members is available from PHP 5.3 up public $sBaseConf = - "9I7SjYrOVJJbDRCZTBFTjhiOVI5VElTamJwNDQ3Qk9FeWdLQjVXaHBaRFBHemxYV0NZYVJ2ZWN2SmMrS -m1taGh4OHk3Z0NXbUFDWUJaWjZXYVJicEM3a3AwTTFYWlVOZXlhYitWa2ptTDBLSVh0R1ArbkRYT3Jub -jE0cm1sSVgxOWpIMGQ1NjJ3TklEVTE1YW5YR1VueW4zcUNqZHNQK0NKRW1WOFpENGdISms4QTlDdS8xQ -kYzUldpVkJiNXVkUVZFK0dyd2hTcXRRb0tjN0ZCdHJ3VGJyVzZSbFdyc01yeXp4WVM3Sk9DblhqR0ZIY -lZWa0h3WGF3b0NYWlloT0dsU0dPYkJpWjR6M3dWdllFVFE0eVhiQWM0cHdLdmQ4cHhYR1kySWZ3T2EzW -DQ9"; + "BZtOXBwVDA5M0hEL3JqNlIwbDZ5OC9lYzM0NFM3RC82d2ZnQzU5TjgvSHduVWJtMjNZd1hkSHVpYUd5d +mdDY1h0ejBtZmVWL01VL2dlQWF4NVBJY0d0ZHErSS9yOFY2UEtMcjhMWkN5T3J2ckdNMWl4RWhKSERCd +FdkMWZKZW5IZU9BMHJNeG5NdXExaWhRYXZqMEhPeHR2cTh0dEk2L2NTYkVsNWkzbGhiQnUvSk90L1pqb +Uk4amw1UXBaMTh2aUpoZlphbmN2ZG1ZcVAxQ2pUVW9ycUFhOFQrTHRDUlc0bFh6SXFEWWFjVDVzaHVBd +XYxSzhpcGxhMTRySGFVdmlnMTNSNDJ1aXJVQmMvRC9jaWltcnJQd3JwVmdobTlhWldrVm1WOXhwWGpiR +EpqbzRPb1QyYysrcy9oZHlJV3VMUDBmTmVjMzhWOG5kd0xJdVVYcWxsYTF3PT0="; public $sRequirements = ''; 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 a783137..e72dff8 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 @@ -198,6 +198,15 @@ $aLang = array( '_gat.GA_Tracker_._setDetectTitle" target="gahelp">hier. Diese Einstellung steht für Universal '. 'Analytics nicht mehr zur Verfügung', + 'D3_GOOGLEANALYTICS_ANALYTICSREMARKETING' => 'Remarketing (via Analytics)', + 'D3_GOOGLEANALYTICS_ANALYTICSREMARKETING_TRANSMIT' => 'Remarketingdaten als individuelle Daten übertragen', + 'D3_GOOGLEANALYTICS_ANALYTICSREMARKETING_TRANSMIT_DESC' => 'Aktivieren Sie die Option, wenn Sie die '. + 'Remarketingdaten außerhalb von AdWords übertragen möchten. Diese werden dann als '. + 'individuelle Daten gesendet. Richten Sie die Dimensionen so ein, wie dies unter '. + 'dem '. + 'Google-Beitrag beschrieben ist.
Zusätzliche "individuelle Daten" werden dann ab der '. + '4. Dimension übermittelt.', + 'D3_GOOGLEANALYTICS_CUSTOMVARS' => 'individuelle Daten', 'D3_GOOGLEANALYTICS_CUSTOMVARS_TRANSMIT' => 'individuelle Daten übertragen', 'D3_GOOGLEANALYTICS_CUSTOMVARS_TRANSMIT_DESC' => 'Mit individuellen Daten können Sie '. @@ -291,7 +300,7 @@ $aLang = array( 'target="gahelp">hier
  • Universal: hier
  • ', - 'D3_GOOGLEANALYTICS_ADWORDSREMARKETING' => 'Remarketing', + 'D3_GOOGLEANALYTICS_ADWORDSREMARKETING' => 'Remarketing (via AdWords)', 'D3_GOOGLEANALYTICS_ADWORDS_SETREMARKETING' => 'Remarketing-Code aktivieren', 'D3_GOOGLEANALYTICS_ADWORDS_SETREMARKETING_DESC' => 'Die Option aktiviert den Remarketing-Code. '. 'Dann ist die Eingabe der Conversion-ID obligatorisch.', @@ -315,7 +324,7 @@ $aLang = array( 'D3_GOOGLEANALYTICS_SETCAMPAIGNTHANKYOUONLY' => 'Kampagnendaten nur in Bestellabschlussseite '. 'verwenden', 'D3_GOOGLEANALYTICS_SETCAMPAIGNTHANKYOUONLY_DESC' => 'Ist dieser Haken nicht gesetzt, wird der '. - 'Kampagnencode shopweit eingefügt. Ob diese Einstellung notwendig ist, erfahren Sie bei Ihrem Conversion '. + 'Kampagnencode shopweit eingefügt. Ob diese Einstellung notwendig ist, erfahren Sie bei Ihrem Conversion '. 'Tracking Anbieter.', 'D3_GOOGLEANALYTICS_CAMPAIGNCODE_CODE' => 'Code', 'D3_GOOGLEANALYTICS_CAMPAIGNCODE_CODE_DESC' => 'Kopieren Sie hier den Kampagnen-Tracking-Code '. diff --git a/copy_this/modules/d3/d3_googleanalytics/views/admin/en/d3_googleanalytics_lang.php b/copy_this/modules/d3/d3_googleanalytics/views/admin/en/d3_googleanalytics_lang.php index e78f054..7047967 100644 --- a/copy_this/modules/d3/d3_googleanalytics/views/admin/en/d3_googleanalytics_lang.php +++ b/copy_this/modules/d3/d3_googleanalytics/views/admin/en/d3_googleanalytics_lang.php @@ -27,7 +27,7 @@ $aLang = array( //Navigation 'charset' => 'ISO-8859-15', - 'd3mxgoogleanalytics' => " Google Services", + 'd3mxgoogleanalytics' => " Google Services", 'd3mxgoogleanalytics_settings' => 'Settings', 'd3tbclgoogleanalytics_main' => 'Analytics', 'd3tbclgoogleanalytics_adwords' => 'AdWords', @@ -198,6 +198,15 @@ $aLang = array( '_gat.GA_Tracker_._setDetectTitle" target="gahelp">hier. Diese Einstellung steht für Universal '. 'Analytics nicht mehr zur Verfügung', + 'D3_GOOGLEANALYTICS_ANALYTICSREMARKETING' => 'Remarketing (via Analytics)', + 'D3_GOOGLEANALYTICS_ANALYTICSREMARKETING_TRANSMIT' => 'Remarketingdaten als individuelle Daten übertragen', + 'D3_GOOGLEANALYTICS_ANALYTICSREMARKETING_TRANSMIT_DESC' => 'Aktivieren Sie die Option, wenn Sie die '. + 'Remarketingdaten außerhalb von AdWords übertragen möchten. Diese werden dann als '. + 'individuelle Daten gesendet. Richten Sie die Dimensionen so ein, wie dies unter '. + 'dem '. + 'Google-Beitrag beschrieben ist.
    Zusätzliche "individuelle Daten" werden dann ab der '. + '4. Dimension übermittelt.', + 'D3_GOOGLEANALYTICS_CUSTOMVARS' => 'individuelle Daten', 'D3_GOOGLEANALYTICS_CUSTOMVARS_TRANSMIT' => 'individuelle Daten übertragen', 'D3_GOOGLEANALYTICS_CUSTOMVARS_TRANSMIT_DESC' => 'Mit individuellen Daten können Sie '. @@ -291,7 +300,7 @@ $aLang = array( 'target="gahelp">hier
  • Universal: hier
  • ', - 'D3_GOOGLEANALYTICS_ADWORDSREMARKETING' => 'Remarketing', + 'D3_GOOGLEANALYTICS_ADWORDSREMARKETING' => 'Remarketing (via AdWords)', 'D3_GOOGLEANALYTICS_ADWORDS_SETREMARKETING' => 'Remarketing-Code aktivieren', 'D3_GOOGLEANALYTICS_ADWORDS_SETREMARKETING_DESC' => 'Die Option aktiviert den Remarketing-Code. '. 'Dann ist die Eingabe der Conversion-ID obligatorisch.', @@ -395,9 +404,9 @@ $aLang = array( 'D3_GOOGLEANALYTICS_MAIN_USEOPTOUT' => 'Opt Out anbieten', 'D3_GOOGLEANALYTICS_MAIN_USEOPTOUT_DESC' => '

    Wird dieser Haken gesetzt, wird im Frontend '. 'ein Opt-Out-Bereich im Header angezeigt. In dem Bereich kann der Benutzer einen Link anklicken, '. - 'mit dem für diesen Nutzer das Tracking für diese Seite deaktiviert wird.

    Weitere Informationen zu '. - 'dieser Option finden Sie in der Google-Suche.

    ', + 'mit dem das Tracking für diese Seite deaktiviert wird.

    Weitere Informationen zu dieser Option finden '. + 'Sie in der Google-Suche'. + '.

    ', // Erweiterung des Links in der Fussnote "Hilfe Starten" 'D3_GOOGLEANALYTICS_HELPLINK' => 'Fragen-zu-speziellen-Modulen/Google-Analytics/', @@ -405,7 +414,5 @@ $aLang = array( /* - -[{ oxmultilang ident="GENERAL_YOUWANTTODELETE" }] - +[{oxmultilang ident="GENERAL_YOUWANTTODELETE"}] */ 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 bfee3a0..2995419 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 @@ -389,6 +389,26 @@ +
    +
    + + + [{oxmultilang ident="D3_GOOGLEANALYTICS_ANALYTICSREMARKETING"}] + + +
    +
    + +
    +
    + + getValue('blD3GAUseAnalyticsRemarketing')}]checked[{/if}] name="value[blD3GAUseAnalyticsRemarketing]"> + [{oxinputhelp ident="D3_GOOGLEANALYTICS_ANALYTICSREMARKETING_TRANSMIT_DESC"}] +
    +
    +
    +
    +
    diff --git a/setup+doku/changelog.txt b/setup+doku/changelog.txt index 2b8667d..10762bd 100644 --- a/setup+doku/changelog.txt +++ b/setup+doku/changelog.txt @@ -1,3 +1,6 @@ +=> 3.3.3.0 +- Remarketing (via Analytics) eingefügt + => 3.3.2.0 - fix: Optionen im Admin können nicht deaktivert werden - "Zertifizierter Händler" im Shop aktivieren