in google analytics, page shown landing page , visited page:
subdomain.domain.com.au/404.html?page=/&from=
the tracking code in place goes this:
<script> (function(i,s,o,g,r,a,m){i['googleanalyticsobject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o), m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'ua-xxxxxxxx-x', 'auto'); ga('set', 'forcessl', true); ga('require', 'displayfeatures'); ga('send', 'pageview', '404.html?page='+ document.location.pathname + document.location.search +'&from=' + document.referrer); </script> if interpret url shown analytics, visit resulted 404 visit "/", right? if right, how come "/" results 404?
then here's url shown that's 404-related:
subdomain.domain.com.au/404.html?page=/sample-page/&from=http://subdomain.domain.com.au/
does mean visit resulted 404 made "/sample-page/" , originated "subdomain.domain.com.au/"?
but "/sample-page/" why show 404? plus, there no wrong links present @ "subdomain.domain.com.au/" how wrong page originate it?
this confusing me. feedback appreciated.
you can follow 1 of these wordpress links create 404 template can apply ga 404 code:
https://codex.wordpress.org/creating_an_error_404_page
http://www.wpbeginner.com/wp-themes/how-to-improve-your-404-page-template-in-wordpress/
or search wordpress 404 plugins.
i not totally familiar wp may need see how of ga code needs included. , don't forget fix existing pageview code removing 404 bit.
Comments
Post a Comment