I’m building a page using “:target” pseudo-selectors linking to different content and resulting in bookmarkable hash-marked “pages”
For example:
<ul class="menu">
<li><a href="#home">Home</a></li>
<li><a href="#history">History</a></li>
<li><a href="#news">News</a></li>
</ul>
<div class="pages">
<div id="home">...</div>
<div id="history">...</div>
<div id="news">...</div>
</div>
I’m wondering how this affects page hits and search engine ranking, compared to links to unique pages. I assume as long as the href is to content on the same page, it only counts as one hit. True?
You still need to call
_trackPageviewif you want to register these as different page hits. Google Analytics will not automatically capture these events and will treat it as a single page otherwise.