• Coding Beauty
  • Posts
  • 😲The secret code Google uses to monitor everything you do online

😲The secret code Google uses to monitor everything you do online

Insane ways Google tracks you

In partnership with

New puzzle to train your brain and test your coding understanding✨

I was coding and stumbled upon something really disappointing the other day.

Do you see it?

Let’s zoom in a bit more:

This line:

Please don’t do this in any language.

Don’t await properties.

You’re destroying your code readability and ruining the whole concept of OOP.

Properties are features not actions.

They don’t do like methods. They are.

They are data holders representing states of an object.

Simple states:

class Person {
  firstName = 'Tari';
  lastName = 'Ibaba';
  site = 'codingbeautydev.com';
}

Derived states -- what getters are meant for:

Google now has at least 3 ways to track your search clicks and visits that they hide from you.

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.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjUmK2Tk-eCAxXtV0EAHX3jCyoQFnoECAkQAQ&url=https%3A%2F%2Fcodingbeautydev.com%2Fblog%2Fvscode-tips-tricks&usg=AOvVaw0xw4tT2wWNUxkHWf90XadI&opi=89978449

I curiously visited the page and guess what? It took me straight to the original URL.

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:

<a jsname="UWckNb"
   href="https://codingbeautydev.com/blog/vscode-tips-tricks"
   data-jsarwt="1"
   data-usg="AOvVaw0xw4tT2wWNUxkHWf90XadI"
   data-ved="2ahUKEwjUmK2Tk-eCAxXtV0EAHX3jCyoQFnoECAkQAQ">
</a>

A JavaScript function would change the href to a new URL with several parameters including the original URL, as soon as you start clicking on it:

The new Zustand library changes everything for state management in web dev.

The simplicity completely blows Redux away. It’s like Assembly vs Python.

Forget action types, dispatch, Providers and all that verbose garbage.

Just use a hook! 👇

import { create } from 'zustand';

const useStore = create((set) => ({
  count: 0,
  increment: () => set((state) => ({ count: state.count + 1 })),
}));

Effortless and intuitive with all the benefits of Redux and Flux — immutability, data-UI decoupling…

With none of the boilerplate — it’s just an object.

Redux had to be patched with hook support but Zustand was built from the ground up with hooks in mind.

Whiskey: The Tangible Asset for Your Portfolio

Most people fail to diversify their investments.

They invest all their money in intangible assets like stocks, bonds, and crypto.

The solution - fine whiskey.

Whiskey is a tangible asset, providing a unique appeal compared to other investments. Casks of whiskey have measurable attributes like size, age, and weight, making their value indisputable. This physical nature allows for clear identification of issues and adjustments to safeguard future value.

Vinovest’s expertise in managing these tangible assets ensures your whiskey casks are stored and insured to the highest standards, enhancing their worth over time. Discover how this tangible, appreciating asset can enhance your investment portfolio.

Thanks for taking the time to read today’s issue.

Don’t let the bugs byte,
The Coding Beauty team