A new custom way to ignore hits
As I'm developing Scribbles I wanted an easy way to ignore hits of logged in users, without having to do any trickery with adding an ignore via localStorage.
The need for this came because a blog could have Tinylytics enabled, and if it was your blog, it would always register a hit — and like any good blogger you probably check your blog a lot. On top of this, the blog shows up on the main scribbles.page domain, for example a blog could be here: scribbles.page/updates. It doesn't have to be "updates" as such, but you catch my drift.
However, to avoid a full on block on hits across all sites on Scribbles (because you are nice and caring), the localStorage options is not really an option. On top, I couldn't just not load the script if it was your blog because now you would miss your kudos button...
So I had a requirement where if this was your blog, and you navigated to it, it would ignore the hit collection — but if you landed on another blog, which did not belong to you, it would collect a hit as normal.
Another great use case for this if you're development your own website, but have a local environment and don't want to mess up the numbers 🙋♂️
The `ignore` parameter
Now you can set an ignore parameter to your script, depending on your needs of course. It's super straight forward:
<script src="https://tinylytics.app/embed/YOUR-SITE-ID.js?ignore&kudos"></script>
As always, the tinylytics script is dynamic to your needs so when it
sees the ignore
parameter it will bring back a super lightweight
version and not send a hit to the server.
In the example above I also added the kudos
parameter so you can see
how it would work together.
If you have any specific needs as you build out your integration, just let me know.