Looking to measure webpages to see how far users scroll - google-tag-manager

So, I use Google Tag Manager to track user's scroll depth.
The problem is, I want to see where most users appear to stop scrolling and leave the page. I don't know how long the page is so I can't estimate, for example, how far a 25% scroll depth is and what they see.
Is there a tool to measure webpage length so I can get a better sense of what my users are viewing? I've been looking around but most results I get are the size (mb, kb, that sort of thing) of webpages.

You can get this information with JavaScript (in GTM) and send it to Google Analytics in a custom dimension (hit level) so you can use it in the reports.

Related

Links and Interactive elements within Live Regions

I was just wondering if it is allowed to have links or other interactive elements which performs an action within a live region?? The fact that the links are interactive and live regions are immediately made available to screen readers, is there a Success criteria or recommendation from WCAG that says not to do that?
There's nothing in WCAG that specifically addresses your situation but links and live regions are unrelated topics.
A live region is used when there is dynamic content on the page. For example, if you have a page with search results and there are filters to limit the results, as you select various filters, the number of results change (dynamic) and that change should be announced to assistive technology, typically through a live region.
Another example is a "settings" page. As you change settings, if the changes are automatically saved and a message displays saying the changes were saved, that message is dynamic (it was added to the page) and like the search result changes should be conveyed to assistive technology, again, typically through a live region.
In your situation, you have a link in a live region. Is the text for that link dynamic? Is there something that will cause the link text to change? If so, then it makes sense to have the link in a live region.

Tracking page visibility

I have a very long website with text to read.
There are no links on my page, it's all on one single pages.
I'm interested in tracking which part of the page the users spends most time reading.
Is this possible with Google Analytics and Google TagManager?
I searched through "User Timings", but I don't think that this helps me much.
You might want to look at scroll depth tracking. Events are fired every x% of the scroll. If the user doesn't scroll enough, they didn't find relevant content or engaging. User Timing can get skewed because of the aggregation of the session time and GA recording 00:00 for a bounced session.
Also use scroll depth instead of element visibility for tracking long form content. Element visibility is typically used when an element appears that shows up dynamically because of an interaction.
Google Tag Manager already has native Scroll Depth Variable that you can use to trigger the events.
For scroll tracking implementation refer to this link -
https://www.simoahava.com/amp/analytics/scroll-depth-trigger-google-tag-manager/
I suggest using a tool like CrazyEgg or Lucky Orange, these tools also save videos from the user interaction, so it's maybe more useful than just the raw metrics.
As #AnkDasCo said the Scroll Tracking is the Google Analytics way to go.

Finding click-counter for NFP website, written in iframe

I am a non-programmer working for a church. We have no tech staff. Our website is based upon a template that doesn't provide a widget for counting clicks. We'd like to add one (or preferably two) jpg image(s) with a counter(s) to track the number of times clicked, and display the cumulative total next to the jpg(s). Church members will go to the page and click each time they participate in one or both of two different church objectives.
Our web host says to do this I must find, write, or purchase 3rd party code written in iframe, to embed into one of our pages.
I googled the issue and am only finding hit counters which track visitors to a page, rather than clicks of an image. We'd prefer two different jpgs to track two different objectives, but if necessary I can change from two jpgs to one, if having two counters on the same page is a problem.
Can anyone point me to where I could get code like this either for free, or for pay, and what it would cost?
There is a lot of good information here. They talk about an issue with iframe receiving the click vs. you recording it. If you keep reading there is a possibility to work it. Hope this helps!
Look here: Detect Click into Iframe using JavaScript

Page counter and Google Analytics show different page visits

I have enabled a hit page counter in my website (www.ludhianaweddings.com) to count daily visits. Its an Update SQL query on each and every page that is updated by 1 each time any page is visited. I am also using Google analytics to overview my site. Now i am getting different results in both. For me Hit page counter always show more visits than Google analytics. For example from last three days my hit counter visits are 319, 411, 379. While Google analytics showing 199, 266, 234 in its reports.
I have put my update query on top of the page and Google analytics code after closing body tag. Is it can be a reason for that ??
Sorry to those who will say it off topic as i had no other better option to ask this from expert(s).
Please help me out...Thanks in advance
I doubt that you will ever get your Hit counter to match 100% with Google analytics. There are a lot of things that can cause Google analytics to not log a hit. The first being the user not having JavaScript enabled the second being possibly ad blocker.
There are also referral spam bots which will insert random hits into your Google analytics account directly and bypass your website 100%. In that case your Google analytics will record higher numbers then your hit counter.
It also depends on what metrics you are looking at:
ga:sessions The total number of sessions.
ga:users The total number of users for the requested time period.
ga:pageviews The total number of pageviews for the property.
These are all different numbers and may have different results depending upon how you look at them.
This seems at least vaguely code related, so, not off-topic.
Placing JavaScript code after the closing body tag is technically wrong, although in most cases it will still work.
If anything you would put it before the closing body tag. Even that would not give you the optimum result, as this would not count users that have aborted the loading process before the page was finished.
But at the end of the day Javascript-based tracking will always give you less visits then a serverside solution. Many bots do not execute JavaScript, people can opt-out from tracking and some adblockers block Analytics tags from working. Not really much you can do about it, except trying to figure out if the sample you are catching with javascript tracking is still big enough to allow conclusions based on it (for the moment I'd say yes, usually it is).

SEO for CSS and JS hide/show

We're building a site for an academic institution. This institution offers many subjects, and we don't want to show all of them at once on the homepage. So we designed a homepage that shows the 2 main categories of studies, and clicking on a category will show a div with the list of subjects in that category.
Our client is worried SEO-wise about those div's being hidden on page-load. Is he correct in his concern?
It depends on how you hide them if you use a z-order or a far left off screen position they will still be read by the Google bot. if you use display none or hidden then it may have an effect on your SEO.
You're right to have concern. Google will count some of or significantly reduce content that isn't displayed on page load. I would recommend letting the text display at load, then setting it to display none via JavaScript. This way the search engine picks it up.
You can do so with a simple jQuery hide snippet like this:
<p class="remove">Text displayed on load.</p>
$j(document).ready(function(){
$('.remove').hide();
});
I read an article by Roger Johansson on this subject, and it seems that the conclusion is that as long as the intent isn't to show that content only to search engines, hiding is fine. I don't see any mention of preferring one method of hiding over the other.
In addition, in that post's comments there was a link to an answer by a Google worker that said:
Merely using display:none will not automatically trigger a penalty. The key is whether or not there is a mechanism - either automatic or one that is invoked by the user - to make the content visible
In my case of course there will be such a mechanism, because we want our users to see that content, just not at page-load...

Resources