How to count the number of Google ad clicks

Source: Internet
Author: User

Google controls the content displayed on advertisements like Google, and uses common pages to submit connections, we are unable to count how many times Google ads are clicked on our page and who has clicked them. Because these pages are not under our control.

The following describes how to count the number of ad clicks like Google.

<Html>
<Head>
<Title> click count </title>
<Script language = "javascript">
<! --
Function keyDown (e)
   {
If (event. srcElement. tagName = 'iframe'
& Event. clientX =-1
& Event. clientY =-1
& Event. fromElement = '[object]') {
// If you need to submit to other pages
// Document. adform. submit ();
Var num = parseInt (shownum. innerHTML );
Shownum. innerHTML = num + 1;
        }
Return false;
    }
Document. onmousemove = keyDown;
Document. onmouseover = keyDown;
Document. onmouseout = keyDown;
Document. onblur = keyDown;
// -->
</Script>
</Head>
<Body>
<! -- If you want to pass parameters to another page, use the following method. // -->
<Form name = "adform" method = "post" action = "ad_click.php" target = 'ad _ click'>
<Input name = "uid" value = '000000' type = "hidden" id = "uid">
<Input name = "keyid" type = "hidden"
Value = '000000' id = "keyid">
<Input name = "aid" type = "hidden" id = "aid">
</Form>
<Iframe name = 'ad _ click' marginwidth = "0"
Marginheight = "0" frameborder = "0" scrolling = "no"
Sr

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.