8
0

change basic settings

Dieser Commit ist enthalten in:
Daniel Seifert 2019-09-18 23:08:47 +02:00 committet von Daniel Seifert
Ursprung cda9a8bd4b
Commit 03d7c12f1d
2 geänderte Dateien mit 139 neuen und 249 gelöschten Zeilen

Datei anzeigen

@ -142,6 +142,15 @@
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_GAID_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="sD3GAAdditionalProperties">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_ADDPROP"}]</label>
</dt>
<dd>
<textarea id="sD3GAAdditionalProperties" class="confinput" name="valuearr[sD3GAAdditionalProperties]">[{$edit->getEditValue('sD3GAAdditionalProperties')}]</textarea>
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_COOKIEPREFIX_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GAAnonymizeIP">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_ANONYMIZEIP"}]</label>
@ -163,6 +172,17 @@
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_USEOPTOUT_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GATrackPageLoadTime">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME"}]</label>
[{* _gaq.push(['_gat._trackPageLoadTime']); *}]
</dt>
<dd>
<input type="hidden" name="value[blD3GATrackPageLoadTime]" value="0">
<input id="blD3GATrackPageLoadTime" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GATrackPageLoadTime')}]checked[{/if}] name="value[blD3GATrackPageLoadTime]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME_DESC"}]
</dd>
</dl>
</div>
</div>
@ -202,71 +222,40 @@
</dl>
</div>
</div>
[{*--------------------------------------*}]
[{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}]
<hr>
<div class="servicedesc">[{oxmultilang ident="D3_GOOGLEANALYTICS_DESC"}] [{oxinputhelp ident="D3_GOOGLEANALYTICS_DESC1"}]</div>
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN"}]
[{oxmultilang ident="D3_GOOGLEANALYTICS_CROSSDOMAIN"}]
</span>
</a>
<dl>
<dt>
<label for="blD3GASampleRate">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SAMPLERATE"}]</label>
[{* _gaq.push(['_setSampleRate', 5]); *}]
<label for="sD3GACrossDomainDomain">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_CROSSDOMAINDOMAINS"}]</label>
</dt>
<dd>
<input type="hidden" name="value[iD3GASampleRate]" value="0">
<input type="text" id="iD3GASampleRate" class="edittext ext_edittext" value="[{if $edit->getValue('iD3GASampleRate')}][{$edit->getValue('iD3GASampleRate')}][{else}]100[{/if}]" size="5" maxlength="3" name="value[iD3GASampleRate]"> [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SAMPLERATE_1"}]
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_SAMPLERATE_DESC"}]
<textarea id="sD3GACrossDomainDomain" class="confinput" name="valuearr[sD3GACrossDomainDomain]">[{$edit->getEditValue('sD3GACrossDomainDomain')}]</textarea>
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_COOKIEPREFIX_DESC"}]
</dd>
</dl>
</div>
</div>
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_GOOGLEANALYTICS_DIMENSIONS"}]
</span>
</a>
<dl>
<dt>
<label for="blD3GATrackPageLoadTime">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME"}]</label>
[{* _gaq.push(['_gat._trackPageLoadTime']); *}]
<label for="sD3GADimensionList">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_DIMENSIONSLIST"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blD3GATrackPageLoadTime]" value="0">
<input id="blD3GATrackPageLoadTime" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GATrackPageLoadTime')}]checked[{/if}] name="value[blD3GATrackPageLoadTime]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GASiteSpeedSampleRate">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SITESPEEDSAMPLERATE"}]</label>
[{* _gaq.push(['_setSiteSpeedSampleRate', 5]); *}]
</dt>
<dd>
<input type="hidden" name="value[iD3GASiteSpeedSampleRate]" value="0">
<input type="text" id="iD3GASiteSpeedSampleRate" class="edittext ext_edittext" value="[{if $edit->getValue('iD3GASiteSpeedSampleRate')}][{$edit->getValue('iD3GASiteSpeedSampleRate')}][{else}]1[{/if}]" size="5" maxlength="3" name="value[iD3GASiteSpeedSampleRate]"> [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SITESPEEDSAMPLERATE_1"}]
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_SITESPEEDSAMPLERATE_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GAUseRemarketing">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_USEREMARKETING"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blD3GAUseRemarketing]" value="0">
<input id="blD3GAUseRemarketing" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GAUseRemarketing')}]checked[{/if}] name="value[blD3GAUseRemarketing]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_USEREMARKETING_DESC"}]
<textarea id="sD3GADimensionList" class="confinput" name="valuearr[sD3GADimensionList]">[{$edit->getEditValue('sD3GADimensionList')}]</textarea>
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_COOKIEPREFIX_DESC"}]
</dd>
</dl>
</div>
@ -312,6 +301,23 @@
</div>
</div>
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
<span class="d3modcfg_btn icon status_ok">
<input type="submit" name="save" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]">
<span></span>
</span>
</td>
</tr>
</table>
<br><br>[{oxmultilang ident="D3_GOOGLEANALYTICS_SECURITYINFORMATIONS"}]
[{*--------------------------------------*}]
<hr>
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
@ -342,101 +348,6 @@
</div>
</div>
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_GOOGLEANALYTICS_DOMAIN"}]
</span>
</a>
<dl>
<dt>
<label for="blD3GAAllowDomainLinker">[{oxmultilang ident="D3_GOOGLEANALYTICS_DOMAIN_SETALLOWLINKER"}]</label>
[{* _gaq.push(['_setAllowLinker', true]); *}]
</dt>
<dd>
<input type="hidden" name="value[blD3GAAllowDomainLinker]" value="0">
<input id="blD3GAAllowDomainLinker" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GAAllowDomainLinker')}]checked[{/if}] name="value[blD3GAAllowDomainLinker]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_DOMAIN_SETALLOWLINKER_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="sD3GASetDomainName">[{oxmultilang ident="D3_GOOGLEANALYTICS_DOMAIN_SETDOMAINNAME"}]</label>
[{* _gaq.push(['_setDomainName', '.example-petstore.com']); *}]
[{* if used _gaq.push(['_setAllowHash', false]); *}]
</dt>
<dd>
<input id="sD3GASetDomainName" class="edittext ext_edittext" type="text" size="30" maxlength="200" value="[{$edit->getValue('sD3GASetDomainName')}]" name="value[sD3GASetDomainName]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_DOMAIN_SETDOMAINNAME_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="sD3GASetCookiePath">[{oxmultilang ident="D3_GOOGLEANALYTICS_DOMAIN_SETCOOKIEPATH"}]</label>
[{* _gaq.push(['_setCookiePath', '/path/of/cookie/']); *}]
</dt>
<dd>
<input id="sD3GASetCookiePath" class="edittext ext_edittext" type="text" size="30" maxlength="150" value="[{$edit->getValue('sD3GASetCookiePath')}]" name="value[sD3GASetCookiePath]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_DOMAIN_SETCOOKIEPATH_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="sD3GACookiePathCopy">[{oxmultilang ident="D3_GOOGLEANALYTICS_DOMAIN_COOKIEPATHCOPY"}]</label>
[{* _gaq.push(['_cookiePathCopy', '/path/of/cookie/']); *}]
</dt>
<dd>
<input id="sD3GACookiePathCopy" [{$blUniversalDisabled}] class="edittext ext_edittext" type="text" size="30" maxlength="150" value="[{$edit->getValue('sD3GACookiePathCopy')}]" name="value[sD3GACookiePathCopy]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_DOMAIN_COOKIEPATHCOPY_DESC"}]
</dd>
</dl>
</div>
</div>
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_GOOGLEANALYTICS_BROWSER"}]
</span>
</a>
<dl>
<dt>
<label for="blD3GASetClientInfo">[{oxmultilang ident="D3_GOOGLEANALYTICS_BROWSER_SETCLIENTINFO"}]</label>
[{* _gaq.push(['_setClientInfo', false]); *}]
</dt>
<dd>
<input type="hidden" name="value[blD3GASetClientInfo]" value="0">
<input id="blD3GASetClientInfo" class="edittext ext_edittext" type="checkbox" [{$blUniversalDisabled}] value="1" [{if $edit->getValue('blD3GASetClientInfo')}]checked[{/if}] name="value[blD3GASetClientInfo]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_BROWSER_SETCLIENTINFO_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GASetDetectFlash">[{oxmultilang ident="D3_GOOGLEANALYTICS_BROWSER_SETDETECTFLASH"}]</label>
[{* _gaq.push(['_setDetectFlash', false]); *}]
</dt>
<dd>
<input type="hidden" name="value[blD3GASetDetectFlash]" value="0">
<input id="blD3GASetDetectFlash" class="edittext ext_edittext" type="checkbox" value="1" [{$blUniversalDisabled}] [{if $edit->getValue('blD3GASetDetectFlash')}]checked[{/if}] name="value[blD3GASetDetectFlash]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_BROWSER_SETDETECTFLASH_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GASetDetectTitle">[{oxmultilang ident="D3_GOOGLEANALYTICS_BROWSER_SETDETECTTITLE"}]</label>
[{* _gaq.push(['_setDetectTitle', false]); *}]
</dt>
<dd>
<input type="hidden" name="value[blD3GASetDetectTitle]" value="0">
<input id="blD3GASetDetectTitle" class="edittext ext_edittext" type="checkbox" value="1" [{$blUniversalDisabled}] [{if $edit->getValue('blD3GASetDetectTitle')}]checked[{/if}] name="value[blD3GASetDetectTitle]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_BROWSER_SETDETECTTITLE_DESC"}]
</dd>
</dl>
</div>
</div>
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
@ -477,19 +388,6 @@
</dl>
</div>
</div>
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
<span class="d3modcfg_btn icon status_ok">
<input type="submit" name="save" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]">
<span></span>
</span>
</td>
</tr>
</table>
<br><br>[{oxmultilang ident="D3_GOOGLEANALYTICS_SECURITYINFORMATIONS"}]
[{/if}]
</td>
</tr>

Datei anzeigen

@ -4,8 +4,8 @@
[{if $oD3GASettings->getValue('blD3GAUseOptOut')}]
[{block name="d3ga_optoutscript"}]
<script type="text/javascript">
var gaProperty = '[{$oD3GASettings->getValue('sD3GAId')}]';
var disableStr = 'ga-disable-' + gaProperty;
let gaProperty = '[{$oD3GASettings->getValue('sD3GAId')}]';
let disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disableStr] = true;
}
@ -19,7 +19,7 @@
[{/if}]
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/ *}]
<!-- Global site tag (gtag.js) - Google Analytics -->
[{* Global site tag (gtag.js) - Google Analytics *}]
<script async src="https://www.googletagmanager.com/gtag/js?id=[{$oD3GASettings->getValue('sD3GAId')}]"></script>
<script>
window.dataLayer = window.dataLayer || [];
@ -29,7 +29,6 @@
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/setting-values *}]
gtag('set', {
'currency': '[{$oD3GAActCurrency->name}]',
'country': 'US',
});
gtag(
@ -57,13 +56,26 @@
[{/if}]
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain *}]
'linker': { 'domains': ['example-1.com', 'example-2.com'] },
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain *}]
'linker': { 'accept_incoming': true },
[{assign var="crossDomains" value=$oD3GASettings->getValue('sD3GACrossDomainDomain')}]
[{if $crossDomains|@count}]
'linker': { 'domains': ['[{"', '"|implode:$crossDomains}]'] },
[{/if}]
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets
siehe auch Event *}]
'custom_map': {'dimension2': 'age'},
[{assign var="dimensionList" value=$oD3GASettings->getValue('sD3GADimensionList')}]
[{if $dimensionList|@count || $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
'custom_map': {
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
'metric1': 'pageLoadTime',
[{/if}]
[{if $dimensionList|@count}]
[{foreach name="dimensions" from=$dimensionList item="dimensionTitle"}]
'dimension[{$smarty.foreach.dimensions.iteration}]': '[{$dimensionTitle}]',
[{/foreach}]
[{/if}]
},
[{/if}]
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization *}]
[{if $oD3GASettings->getValue('blD3GAAnonymizeIP')}]
@ -73,37 +85,76 @@
);
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/ *}]
gtag('config', 'GA_MEASUREMENT_ID_2');
[{* https://developers.google.com/gtagjs/devguide/snippet *}]
gtag('config', 'AW-CONVERSION_ID');
[{* https://developers.google.com/gtagjs/devguide/snippet *}]
gtag('config', 'DC-FLOODLIGHT_ID');
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/events *}]
gtag('event', 'ACTION', { 'event_category': 'CATEGORY', 'event_label': 'LABEL', 'value': 'VALUE' });
[{assign var="additionalProperties" value=$oD3GASettings->getValue('sD3GAAdditionalProperties')}]
[{if $additionalProperties|@count}]
[{foreach from=$additionalProperties item="addProp"}]
gtag('config', '[{$addProp}]');
[{/foreach}]
[{/if}]
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/user-timings *}]
// Feature detects Navigation Timing API support.
if (window.performance) {
// Gets the number of milliseconds since page load
// (and rounds the result since the value must be an integer).
var timeSincePageLoad = Math.round(performance.now());
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
// Feature detects Navigation Timing API support.
if (window.performance) {
// Gets the number of milliseconds since page load
// (and rounds the result since the value must be an integer).
let timeSincePageLoad = Math.round(performance.now());
// Sends the timing event to Google Analytics.
gtag('event', 'timing_complete', {
'name': 'load',
'value': timeSincePageLoad,
'event_category': 'JS Dependencies'
});
}
// Sends the timing event to Google Analytics.
gtag('event', 'timing_complete', {
'name': 'load',
'value': timeSincePageLoad
});
}
[{/if}]
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
[{block name="d3ga_trackpageloadtime"}]
let perfData = window.performance.timing;
let pageLoadTime =
Math.round(
(
(perfData.domComplete > 0 ? perfData.domComplete : perfData.responseEnd) - perfData.navigationStart
) / 1000
);
gtag('event', 'trackPageLoadTime', {
'pageLoadTime': pageLoadTime
});
[{/block}]
[{/if}]
[{* bounce optimization*}]
[{block name="d3ga_bounceoptimization"}]
[{if $oD3GASettings->getValue('blUseBounceRateOptimization')}]
setTimeout("gtag('event', 'NoBounce', {" +
"'event_category': 'Over defined seconds'" +
"})",[{$iD3GASendNoBounceEventTime}]);
[{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}]
window.addEventListener ?
window.addEventListener('scroll', testScroll, false) :
window.attachEvent('onscroll', testScroll);
let scrollCount = 0;
function testScroll() {
++scrollCount;
if (scrollCount === 2) {
gtag('event', 'NoBounce', {
'event_category': 'window scrolled'
});
}
}
[{/if}]
[{/if}]
[{/block}]
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/events *}]
[{* login, logout, toBasket, fromBasket, sendContact *}]
gtag('event', 'ACTION', { 'event_category': 'CATEGORY', 'event_label': 'LABEL', 'value': 'VALUE' });
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/exceptions *}]
gtag('event', 'exception', {
'description': 'error_description',
'fatal': false // set to true if the error is fatal
});
[{* https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets *}]
gtag ('event', 'age_dimension', {'age': 12});
@ -270,18 +321,6 @@
---------------------------------------------------------------------
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=[{$oD3GASettings->getValue('sD3GAId')}]"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '[{$oD3GASettings->getValue('sD3GAId')}]' [{$sD3GACreateParameter}]);
[{include file="d3ga_gtag_ecommerce.tpl"}]
</script>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){
i['GoogleAnalyticsObject']=r;
@ -300,58 +339,11 @@
ga('create', '[{$oD3GASettings->getValue('sD3GAId')}]', '[{$sD3CurrentShopUrl}]' [{$sD3GACreateParameter}]);
[{if $oD3GASettings->getValue('blD3GAAllowDomainLinker')}]
ga('require', 'linker');
ga('linker:autoLink', [[{$sAFEGetMoreUrls}]]);
[{/if}]
[{include file="d3ga_universal_adwords.tpl"}]
[{include file="d3ga_universal_custom.tpl"}]
[{if $oD3GASettings->getValue('blD3GAUseRemarketing')}]
ga('require', 'displayfeatures');
[{/if}]
[{* bounce optimization*}]
[{block name="d3ga_bounceoptimization"}]
[{if $oD3GASettings->getValue('blUseBounceRateOptimization')}]
setTimeout('ga(\'send\', \'event\', \'NoBounce\', \'Over defined seconds\')',[{$iD3GASendNoBounceEventTime}]);
[{if $oD3GASettings->getValue('blSendNoBounceEventScroll')}]
window.addEventListener ?
window.addEventListener('scroll', testScroll, false) :
window.attachEvent('onscroll', testScroll);
var scrollCount = 0;
function testScroll() {
++scrollCount;
if (scrollCount == 2) {
ga('send', 'event', 'window', 'scrolled');
}
}
[{/if}]
[{/if}]
[{/block}]
ga('send', 'pageview' [{$sD3GASendPageViewParameter}]);
[{*[{include file="d3ga_universal_ecommerce.tpl"}]*}]
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
[{block name="d3ga_trackpageloadtime"}]
var perfData = window.performance.timing;
var pageLoadTime =
Math.round(
(
(perfData.domComplete > 0 ? perfData.domComplete : perfData.responseEnd) - perfData.navigationStart
) / 1000
);
ga('set', 'metric1', pageLoadTime);
[{*ga('send', 'event', 'Page Load Time', loadTime, {'nonInteraction': true});*}]
[{/block}]
[{/if}]
</script>
[{*/strip*}]