The merchant gives each affiliate a unique link so they can track who was responsible for a sale. The link will usually look something like this:
When someone clicks that link, a small file called a cookie gets stored on their device.
An affiliate cookie does two things:
It helps the merchant attribute the sale back to the right person;
It (usually) holds an expiration date, so you get paid even if the buyer delays their purchase.
Here’s an example of how this works.
Imagine that a reader visits your post about the best winter jackets. They click on one of your affiliate links, leading them to a product on Amazon.
But they realized they have to pick up their daughter from school. So they leave their house, pick up their daughter, have dinner, and then finally go back to Amazon where they find the product again.
Since they’re already shopping on Amazon, they decide to purchase some ski gear too.
Here’s the good news. Earlier, they clicked on your affiliate link and a cookie was stored on their device. Because Amazon has a 24-hour cookie duration, you get compensated for both the winter jacket and ski gear—even though you didn’t promote the latter.