bounce optimization switch added (#3465)

This commit is contained in:
Daniel Seifert 2015-01-20 11:20:36 +00:00
parent f509aa7110
commit d0a7d9a853
5 changed files with 54 additions and 26 deletions

View File

@ -173,21 +173,27 @@
[{/if}] [{/if}]
[{* bounce optimization*}] [{* bounce optimization*}]
setTimeout('_gaq.push([\'_trackEvent\', \'NoBounce\', \'Over defined seconds\'])',[{$oD3GASettings->getValue('iSendNoBounceEventTime')}]); [{block name="d3ga_bounceoptimzation"}]
[{if $oD3GASettings->getValue('blUseBounceRateOptimization')}]
[{if $oD3GASettings->getValue('iSendNoBounceEventTime')}]
setTimeout('_gaq.push([\'_trackEvent\', \'NoBounce\', \'Over defined seconds\'])',[{$oD3GASettings->getValue('iSendNoBounceEventTime')}]);
[{/if}]
[{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}] [{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}]
window.addEventListener ? window.addEventListener ?
window.addEventListener('scroll', testScroll, false) : window.addEventListener('scroll', testScroll, false) :
window.attachEvent('onscroll', testScroll); window.attachEvent('onscroll', testScroll);
var scrollCount = 0; var scrollCount = 0;
function testScroll() { function testScroll() {
++scrollCount; ++scrollCount;
if (scrollCount == 2) { if (scrollCount == 2) {
_gaq.push(['_trackEvent', 'window', 'scrolled']); _gaq.push(['_trackEvent', 'window', 'scrolled']);
} }
} }
[{/if}] [{/if}]
[{/if}]
[{/block}]
(function() { (function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

View File

@ -52,21 +52,27 @@
[{/if}] [{/if}]
[{* bounce optimization*}] [{* bounce optimization*}]
setTimeout('ga(\'send\', \'event\', \'NoBounce\', \'Over defined seconds\')',[{$oD3GASettings->getValue('iSendNoBounceEventTime')}]); [{block name="d3ga_bounceoptimzation"}]
[{if $oD3GASettings->getValue('blUseBounceRateOptimization')}]
[{if $oD3GASettings->getValue('iSendNoBounceEventTime')}]
setTimeout('ga(\'send\', \'event\', \'NoBounce\', \'Over defined seconds\')',[{$oD3GASettings->getValue('iSendNoBounceEventTime')}]);
[{/if}]
[{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}] [{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}]
window.addEventListener ? window.addEventListener ?
window.addEventListener('scroll', testScroll, false) : window.addEventListener('scroll', testScroll, false) :
window.attachEvent('onscroll', testScroll); window.attachEvent('onscroll', testScroll);
var scrollCount = 0; var scrollCount = 0;
function testScroll() { function testScroll() {
++scrollCount; ++scrollCount;
if (scrollCount == 2) { if (scrollCount == 2) {
ga('send', 'event', 'window', 'scrolled'); ga('send', 'event', 'window', 'scrolled');
} }
} }
[{/if}] [{/if}]
[{/if}]
[{/block}]
ga('send', 'pageview' [{$sD3GASendPageViewParameter}]); ga('send', 'pageview' [{$sD3GASendPageViewParameter}]);

View File

@ -112,6 +112,9 @@ $aLang = array(
'</p>', '</p>',
'D3_GOOGLEANALYTICS_BOUNCEOPT' => 'Absprungdaten optimieren', 'D3_GOOGLEANALYTICS_BOUNCEOPT' => 'Absprungdaten optimieren',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SWITCH' => 'Absprungdaten-Optimierung aktivieren',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SWITCH_DESC' => 'Analytics wertet jeden Benutzer, der nicht '.
'innerhalb der Seite einen Link anklickt, als Abbrecher. Mit dieser Option kann der Wert optimiert werden.',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT1' => 'Seitenbesucher nicht als Abbrecher werten nach', 'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT1' => 'Seitenbesucher nicht als Abbrecher werten nach',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT2' => 'Millisekunden (1000 = 1 Sekunde)', 'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT2' => 'Millisekunden (1000 = 1 Sekunde)',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT_DESC' => '<p>Analytics wertet alle Seitenbucher, die '. 'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT_DESC' => '<p>Analytics wertet alle Seitenbucher, die '.

View File

@ -112,6 +112,9 @@ $aLang = array(
'</p>', '</p>',
'D3_GOOGLEANALYTICS_BOUNCEOPT' => 'Bounce rate optimzation', 'D3_GOOGLEANALYTICS_BOUNCEOPT' => 'Bounce rate optimzation',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SWITCH' => 'Absprungdaten-Optimierung aktivieren',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SWITCH_DESC' => 'Analytics wertet jeden Benutzer, der nicht '.
'innerhalb der Seite einen Link anklickt, als Abbrecher. Mit dieser Option kann der Wert optimiert werden.',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT1' => 'Seitenbesucher nicht als Abbrecher werten nach', 'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT1' => 'Seitenbesucher nicht als Abbrecher werten nach',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT2' => 'Millisekunden (1000 = 1 Sekunde)', 'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT2' => 'Millisekunden (1000 = 1 Sekunde)',
'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT_DESC' => '<p>Analytics wertet alle Seitenbucher, die '. 'D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT_DESC' => '<p>Analytics wertet alle Seitenbucher, die '.

View File

@ -231,6 +231,16 @@
[{oxmultilang ident="D3_GOOGLEANALYTICS_BOUNCEOPT"}] [{oxmultilang ident="D3_GOOGLEANALYTICS_BOUNCEOPT"}]
</span> </span>
</a> </a>
<dl>
<dt>
<label for="blUseBounceRateOptimization">[{oxmultilang ident="D3_GOOGLEANALYTICS_BOUNCEOPT_SWITCH"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blUseBounceRateOptimization]" value="0">
<input id="blUseBounceRateOptimization" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blUseBounceRateOptimization')}]checked[{/if}] name="value[blUseBounceRateOptimization]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_BOUNCEOPT_SWITCH_DESC"}]
</dd>
</dl>
<dl> <dl>
<dt> <dt>
<label for="iSendNoBounceEventTime">[{oxmultilang ident="D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT1"}]</label> <label for="iSendNoBounceEventTime">[{oxmultilang ident="D3_GOOGLEANALYTICS_BOUNCEOPT_SENDTIMEEVENT1"}]</label>