Smart algorithms for showing ads
I would 开发者_StackOverflow中文版really like to know how web sites decide what ad to show to a user and how many times.
I think there must be a table Ads (id, url, ...) which is linked to a table Users by many to many relationship via table Ads2Users (ad_id, user_id, shown_count, clicked_count). So that each time a user is served a particular ad we find (or create) a record in Ads2Users and increment the counter.
Seems simple if we consider registered users and those who do not erase cookies.
Now the question: is that how it works?
You're overcomplicating things. It's certainly possible to track the number of times an ad has been delivered to someone and serve them something different, but there's no major benefit to it. Random delivery tends to be just fine for the vast majority of applications.
If you've got lots of ads (i.e. thousands), the chance of re-delivering the same ad in quick succession is fairly small. If you've got few ads (i.e. 10), not re-delivering the same ad to the same user would mean you run out of ads very quickly. In either situation, tracking delivery wouldn't benefit you at all.
Add in the fact that repeat exposure to advertisements is considered positive in the real world - there's a reason Coca Cola tries to get its logo in TV shows, movies, advertisements, billboards, etc. - and there's really little reason to do this.
精彩评论