A
A
Alex Meller2015-12-21 13:49:26
PHP
Alex Meller, 2015-12-21 13:49:26

How to track clicks on ads and enter this data into the statistics section in your personal account?

There is a task to create your own advertising network. The principle is standard - there is an advertiser who creates an ad, there is a site where this ad is shown, the visitor enters the site site, clicks on the ad, and this click should be displayed in the advertiser's personal account. How to organize all this? The task is also to make a small targeting by geo and age, where to get this information about the visitor?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
riot26, 2015-12-21
@riot26

How to organize all this?

Rough option:
redirect.php
<?php
visitorToDatabase($visitor_info, $_GET['id']);
header('Location: ' . urlFromDatabase($_GET['id']));
?>

The visitor clicks on site.ru/redirect.php?id=1234
where to get this information about the visitor?
read how it is implemented in liveinternet and Yandex.metrics ( https://github.com/hcodes/server_yametrika)
if this whole thing is not for self-study purposes, it is better to quit right away

N
NataliaCh, 2015-12-21
@NataliaCh

when clicking on the banner, you can send an Ajax request to the server, where it will be processed, recorded where necessary, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question