olá gostaria que quando alguem clicasse no anuncio do adsense, gravasse no meu BD alguns dados, como o IP de quem clicou
a questão é como fazer rodar um scritp PHP apos o anuncio ser clicado ?
depois de pesquisar muito, encontrei esse scritp na pagina do anuncio, quando o anuncio é clicado roda o ajax
<script type="text/javascript"> // When the DOM is ready to be interacted with, hook up // the DOM events for Google AdSense tracking. jQuery(function( $ ){ // I am a flag that will determine if the user is // currently mousing over a Google AdSense. var isOverGoogleAd = false; // When a user mouses over a Google AdSense iFrame, we // want to track that activity. This way, when the // current window blurs, we can guesstimate as to // whether or not the window-blur was due to the user // clicking the Google ad. $( "iframe[ id *= adframe ]" ) .mouseover( function(){ isOverGoogleAd = true; } ) .mouseout( function(){ isOverGoogleAd = false; } ) ; // Now that we are tracking the mouse movements over // the Google AdSense, let's track the window's blur // event to see if we can guesstimate the AdSesnse // usage. $( window ).blur( function(){ // Check to see if the user was over a Google // AdSense ad when the window was blurred. if (isOverGoogleAd){ // Because the user was mousing over a // Google AdSense iFrame when the window // was blurred, it is reasonable to // estimate that the blurring is due to // the user clicking one of the ads. $.ajax({ type: "post", url: "click_process.php", data: { adUrl: window.location.href } }); } } ) // Focus the window by default. .focus() ; }); </script>
porem não é oq esta acontecendo, o arquivo click_process.php não esta sendo executado..
alguem pode me ajudar ?