owa tracking half working
initial page load is accurate but then subsequent navigation registers the event as originating not from the destination page but the current page.
This commit is contained in:
parent
ad1118dd04
commit
5776def861
|
@ -0,0 +1,23 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html {{ HTML_ATTRS }}>
|
||||||
|
<head>
|
||||||
|
{{ HEAD }}
|
||||||
|
</head>
|
||||||
|
<body {{ BODY_ATTRS }}>
|
||||||
|
{{ APP }}
|
||||||
|
</body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var owa_baseUrl = 'https://owa.isnet.uk/';
|
||||||
|
var owa_cmds = owa_cmds || [];
|
||||||
|
owa_cmds.push(['setSiteId', '0c3a9f11563be70da80f493a590b46d1']);
|
||||||
|
owa_cmds.push(['trackPageView']);
|
||||||
|
owa_cmds.push(['trackClicks']);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var _owa = document.createElement('script'); _owa.type = 'text/javascript'; _owa.async = true;
|
||||||
|
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl );
|
||||||
|
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
|
||||||
|
var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa, _owa_s);
|
||||||
|
}());
|
||||||
|
</script>
|
||||||
|
</html>
|
|
@ -1,26 +1,12 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export default ({ app }) => {
|
export default ({ app }) => {
|
||||||
/*
|
|
||||||
* ** Only run on client-side and only in production mode
|
|
||||||
* */
|
|
||||||
if (process.env.NODE_ENV !== 'production') return
|
if (process.env.NODE_ENV !== 'production') return
|
||||||
|
|
||||||
var owa_baseUrl = 'https://owa.isnet.uk/';
|
|
||||||
var owa_cmds = owa_cmds || [];
|
|
||||||
owa_cmds.push(['setSiteId', '0c3a9f11563be70da80f493a590b46d1']);
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
var _owa = document.createElement('script'); _owa.type = 'text/javascript'; _owa.async = true;
|
|
||||||
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl );
|
|
||||||
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
|
|
||||||
var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa, _owa_s);
|
|
||||||
}());
|
|
||||||
/*
|
|
||||||
* ** Every time the route changes (fired on initialization too)
|
|
||||||
* */
|
|
||||||
app.router.afterEach((to, from) => {
|
app.router.afterEach((to, from) => {
|
||||||
owa_cmds.push(['trackPageView']);
|
if (window.owa_cmds) {
|
||||||
owa_cmds.push(['trackClicks']);
|
window.owa_cmds.push(['trackPageView']);
|
||||||
|
window.owa_cmds.push(['trackClicks']);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue