DEV Community

Cover image for Do you know <a href ="" ... > tags also used to track users behavior ?
Areeb ur Rub
Areeb ur Rub

Posted on

Do you know <a href ="" ... > tags also used to track users behavior ?

Buy Me A Coffee

If you have ever used HTML before then you might know the anchor tags (<a href="" >Link</a>) but do you know it have many attributes and href is just one of them.

In this post I will tell you about the ping attribute and also tell how it tracks you.

Ping Attribute,

The Ping attributes contains URLs/Address which take post requests. Whenever you click the link it takes you to the website mentioned in the href and simultaneously sends a Post request to server.

So how it tracks you,

The post request sent to the server can contain data related to sites you are browsing or which site you are going on using the link.

Sites like Google uses this to track the users behaviors and also to rank pages.

You can try this by simply doing any google search then open inspect element tool (ctrl+shift+c) now click on any search result link, in the elements tab you can see the anchor tag which have the href as well as ping.
image

Firefox doesn't support ping

image
The ping attribute isn't supported by Mozilla Firefox browser but this don't stop Google to have a track of data, on firefox you will notice that all the links first redirects to a google server link then redirects to the target.

Why Ping-Tracking is done?

The most important reason of tracking is the analytic purpose the search result rankings are done on this analytics only and if no record is made anything will become top search result.


Buy Me A Coffee

Read Also:


Follow me for more:

Top comments (0)