Dec 2023 Newsletter #1

The secret trick Google uses to track everything you search online

Logo

Coding quiz

Guess the output! Is it even allowed?!

Featured content

Google now has at least 3 solid ways to track your search clicks and visits.

Have you ever tried to copy a URL directly from Google Search?

When I did that a few months ago, I unexpectedly got something like this from my clipboard.

In my curiosity, I visited the page, and it took me straight to the URL I originally wanted.

This cryptic URL turned out to be a middleman that would redirect you to  the actual page.

But what for?

After some investigation, I discovered that this was how Google Search had been recording our clicks and tracking every single visited page.

They set custom data- attributes and a mousedown event on each link in the search results page:

With the pipeline operator you'll stop writing code like this:

And start writing code like this:

So refreshingly clean -- and elegant! All those temporary variables are gone -- not to mention the time it took to come up with those names *and* type them (not everyone types like The Flash, unfortunately).

JavaScript generators are way more than just a fancy feature and we are going to discover many powerful use cases for them, including creating engaging animations, and streaming videos over the internet.

If you've never heard of them you may be missing out.

Twitter icon
LinkedIn icon
Facebook icon

Logo