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
@@ -92,6 +92,7 @@ plugin.tx_eptheme {
productUid = {$plugin.tx_eptheme.settings.facebookViewContentProductUid} productUid = {$plugin.tx_eptheme.settings.facebookViewContentProductUid}
nameInternal = {$plugin.tx_eptheme.settings.facebookViewContentNameInternal} nameInternal = {$plugin.tx_eptheme.settings.facebookViewContentNameInternal}
} }
domainsToTrack = bpn.ep-reisen.de,www.ski-boarderweek.de,www.ski-wochenenden.de,www.snowzone.net,www.unichamp.de
} }
view { view {
templateRootPaths.0 = EXT:ep_theme/Resources/Private/Templates templateRootPaths.0 = EXT:ep_theme/Resources/Private/Templates
@@ -324,6 +324,7 @@ new Vue({
}, },
appendPaCode () { appendPaCode () {
const paCode = this.$store.state.config.paCode; const paCode = this.$store.state.config.paCode;
const externalDomains = this.$store.state.config.externalDomains;
if (!paCode) { if (!paCode) {
return; return;
} }
@@ -331,6 +332,9 @@ new Vue({
if (this.hostname === location.hostname) { if (this.hostname === location.hostname) {
return; return;
} }
if (externalDomains.indexOf(this.hostname) === -1) {
return;
}
let url = $(this).attr('href'); let url = $(this).attr('href');
if (!url) { if (!url) {
return; 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>", "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>", "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> </script>