Custom click tracking for adsense -


I need to identify my users when I click on the ad. For example, when user A is online, then I have to know that he was the person who clicked on the ad unit

While using my own ads, this was a piece of cake (by UK redirect) - however, now we are planning to go to AdSense - which presents advertisement through javascript - so I can not set up redirection there.

How do I track - In the case of Adsense, which user to the ad unit -

Thank you very much.

- Maju

Although there is no good way but very easy to do is. First of all, put your AdSense code into the device:

  & lt; Div id = "adsDiv" class = "adsDiv" & gt; & Lt ;! - Your Adsense code here - & gt; & Lt; / Div & gt;  

Now use it in your jquery code:

  $ ("AdsDiv"). Call the PHP function on ("click", function () {setTimeout (function () {// here, AJAX etc, and in PHP you can easily check which users currently click on the ad Is online through sessions.}, 5000);});  

Note that your PHP will function after 5000 ms which means that the user clicked and saw your ad. You can increase or decrease it according to your requirement.


Comments

Popular posts from this blog

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

iphone - How do I make a UIPickerView in a UIActionSheet -