SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AdSense Development Related Question

    So I've noticed that google adsense keeps track of what links clicked on your site.

    For example, assume MySite.com uses adsense AND website MyBlog.com links to MySite.com from file MySite.com/files/path/helloworld.html AdSense will actually provide you the full link.

    Does anyone know how they do this? In know you can use the http "host" header in your code. But that just provides MySite.com not the full path.

    Any ideas?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Not following you -- your order of "myblog" and "mysite" is confusing. Which links to which and which runs AdSense? You're not talking about AdWords?

    You can tell where someone hitting your page came from by looking at the HTTP REFERRER.

    You can tell what link someone clicked from your page to another by attaching an onclick handler to the link and logging it somewhere with AJAX.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    Not following you -- your order of "myblog" and "mysite" is confusing. Which links to which and which runs AdSense? You're not talking about AdWords?

    You can tell where someone hitting your page came from by looking at the HTTP REFERRER.
    I meant Ad sense, but I guess I should have said Google Analytics.

    - MySite.com runs Adsense
    - MyBlog.com is an unrelated external site that has a link to MySite.com
    - The file in MyBlog.com that has the link to MySite.com is www.MyBlog.com/files/hello.html
    - Currently, Google Anayltics gives me that URL.


    I guess you are right and google analytics is using HTTP REFERER. But when I try it on my dev environment it always returns null. I'll try it on online and hopefully get the real results.

    Thanks

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I think when you click a link in google adsense, all the info goes to google, just because they need to know the websites that are linking for the payment etc.
    So when you click you send info to google and go to the website.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •