i try to figure out this problem since a few days but i'm stuck.
I want that Google Analytics count each hash url from my gallery as a page view. I use Grand Media Gallery, with photobox template. >> http://codeasily.com/portfolio-item/gmedia-photobox/
If you click on a picture, a new url is load ex : http://codeasily.com/portfolio-item/gmedia-photobox/#photoBox-43
Unfortunately, GA doesn't count that for a page view. Or i need that stats to know which image is the most viewed on my website.
I try to add that to GA tracking code :
<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-17649764-10', 'auto');
ga('send', 'pageview', {'page': location.pathname+location.search+location.hash});
window.onhashchange = function() {
ga('send', 'pageview', {'page': location.pathname+location.search+location.hash});
}; </script>
But that's not work neither...
i already found that question Google Analytics Setting Up A PageView On Hash Change
But i'm not using isotope, and i already add this to GA tracking code without result. My problem is the page doesn't reload whent users watch my photos...
ga('send', 'pageview', {'page': location.pathname + location.search + location.hash});
Thank you for your help,
Foub