A
A
Alexander2017-09-28 19:59:34
Django
Alexander, 2017-09-28 19:59:34

How would you solve this problem (advertising rotation of two types)?

There are two types of advertising:
1 - customized.
2 - affiliate advertising from google, yandex, etc.
Rotation 2 (custom) to 4 (affiliate).
When the client (unique ip) turned to the server, the server should issue custom advertising, if it applied for the second time, then again, all the rotation of custom advertising is over , partner ads follow next. handling. And so in a circle.
There is an idea to implement this using a table in the database where ip addresses and their current type of advertising and number of impressions will be recorded. I also want to know how you would implement it, maybe someone knows a simpler way.
Do you think this task is correct? because I think that some users will have a common internet provider and a given internet provider will have one ip address for all their clients.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Talalaev, 2017-09-28
@kentuck1213

Use cookies.
The database and so on are needed only for additional analytics, so if necessary, you can screw it up.
And so write in the cookie the number of views of custom advertising, and when the user enters, depending on the value, choose what to show.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question