Append tracking codes to selectable domains only

This commit is contained in:
Björn Fromme
2019-06-26 09:04:14 +02:00
parent 168aa0a8be
commit 215f2162d4
3 changed files with 7 additions and 1 deletions
@@ -324,6 +324,7 @@ new Vue({
},
appendPaCode () {
const paCode = this.$store.state.config.paCode;
const externalDomains = this.$store.state.config.externalDomains;
if (!paCode) {
return;
}
@@ -331,6 +332,9 @@ new Vue({
if (this.hostname === location.hostname) {
return;
}
if (externalDomains.indexOf(this.hostname) === -1) {
return;
}
let url = $(this).attr('href');
if (!url) {
return;
@@ -2,6 +2,7 @@
{
"loaderUrl": "<f:format.raw>{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/ajax-loader-white.gif', absolute: 1)}</f:format.raw>",
"myEpApiBaseUrl": "<f:format.raw>{settings.myEpApiBaseUrl}</f:format.raw>",
"paCode": <f:if condition='{context.paCode}'><f:then>"{context.paCode}"</f:then><f:else>null</f:else></f:if>
"paCode": <f:if condition='{context.paCode}'><f:then>"{context.paCode}"</f:then><f:else>null</f:else></f:if>,
"externalDomains": {settings.domainsToTrack -> v:iterator.explode() -> f:format.json() -> f:format.raw()}
}
</script>