Google Analytics is the most popular website statistics service. It is used for many purposes: from tracking visitors and sessions to campaigns and events.
Ability to track any events provides us possibility to send and track any data in Google Analytics. One of the most useful in that case for web developers might be errors analytics.
So far Google proposes 2 ways of tracking events:
- Classic ga.js with the for tracking like
- Newer analytics.js has syntax
ga('send', ...)and is part of the new Universal Analytics
In short, Fetch API- it's a new Promise- based standard for doing AJAX requests.
Syntax for XHR was provided more then 10 years ago (XMLHttpRequest2 - about 4 years ago).
Many things changed, we got HTML5, CSS3, also close to start using EcmaScript 6.
It’s time for new laconic API to do AJAX-requests and interact with them.
And time is come!
Sometimes to highlight something we need to fade entire page except element/part which we want to focus.
When you have big project with many files and dependencies, usually you should care about good code base and periodic cleaning / refactoring. The same situation I had when decided to refactor SCSS files- structure, naming and variables…
I was surprised when figured out- there aren’t good instruments to find unused SCSS variables.
The ways they appear is usual:
- somebody removed use of variable but forgot to delete declaration
- it was used for declaration of another variable or inside some expression
- someone added it "for future" or decided to use variable later