Google Analytics – alert when real-time value changes

Google Analytics – alert when real-time value changes

Running a niche web site and want to count every single visitor? I created a script that runs on the Google Analytics report page and alerts with a sound whenever the count of current visitors changes – so when a new person enters your site or leaves it.

That script runs in Violentmonkey host (a clone of Greasemonkey). It has one setting – the interval for checking the counter (line 12).

First, create a new script in your tool and paste the code:

JS

Then just open a Google Analytics dashboard page or real-time report and the script will start observing the big counter of current visitors. You should hear the sound at the beginning and whenever the value of the counter changes (increases when new visitors arrive and decreases when visitors leave the page).

And, by the way, you can modify the default sound – it’s defined in line 15.

Note: I'll soon be sharing short, practical tips on Angular — a good way to pick up something new if you're interested.

Read next

0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
سورة البقرة مكررة
سورة البقرة مكررة
8 months ago

Your writing is a true testament to your expertise and dedication to your craft. I’m continually impressed by the depth of your knowledge and the clarity of your explanations. Keep up the phenomenal work!

1
0
Would love your thoughts, please comment.x
()
x