Creating an advertising system for your websites (my own adsense)

I don’t know the right term for this, but I’ll say that I want to have ads on my websites, where advertisers have to pay every time users click on websites. How to do it?

My approach is to link the ad with a script file that will record a click in the database and redirect the user to the advertiser's site. I see one weakness in this; the same user can click an ad several times during the timeframe, and several clicks will be recorded.

To avoid this, I am thinking of setting a cookie for each visitor, and each visitor click will be recorded only once a day. (But what if the cookie is disabled).

What is the right way to create such an advertising system on a website? Can you share your methodologies?

+3
source share
3 answers

You can record the user's IP address in the cache or in the database to prevent multiple clicks in one day.

+2
source

I recently created such a system, please see its textsensor.com website promotion . So, as we do this, you need to consider these points.

1) Cross Ajax domain is not allowed, therefore, no data is sent to your server when some user clicks on an ad that may be present on the website of any publisher, and you may have received them in thousands.

2) , , :), .

3) script, - .

4) .

<script src="http://dennis.com/ads_application/get_my_ads.php">

, php, 1 js, php -,

    <script type="text/javascript" src="http://www.dennis.com/ad_application/inline.js">
</script>

5) , script script inline.js 4.

<script type="text/javascript">
 var ad_publisher = "5122";
 var ad_campaign = "11129";
 var ad_type = "inline";
</script> 

6) , -

7) inline.js textsensor.com

8). , , , ipaddress, cookie. , ipaddress , .

+4

, . , doubleclick, google behemouths. , , , .

, , cookie.

You can also use a unique URL for each ad. Thus, if the same URL is double-clicked, then you know that the user double-clicks the same ad.

Even if there is only 1 ad on your site, it will always have a GUID or something in it, so you know that this is a unique click.

Good luck.

+1
source

Source: https://habr.com/ru/post/1760024/


All Articles