SitePoint Sponsor

User Tag List

Page 2 of 5 FirstFirst 12345 LastLast
Results 26 to 50 of 123
  1. #26
    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)
    Oh, you're right. I forgot the SiteID is part of the javascript. In fact, I don't even know if the version I just put up requires the siteid column... let me see if it still works after removing it from the tracker.php.

    Well, two seconds and I'll add the updated file to the zip so that existing people don't have to empty their tables.

  2. #27
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman
    Oh, you're right. I forgot the SiteID is part of the javascript. In fact, I don't even know if the version I just put up requires the siteid column... let me see if it still works after removing it from the tracker.php.


    I noticed that too after coding the original, and just now am about finished with using the tracker table..

  3. #28
    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)
    OK, updated site again. You don't need to clear your tables to use the new version with the site tracking. Just overwrite reports.php with this one; it includes all the updates.

  4. #29
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman
    OK, updated site again. You don't need to clear your tables to use the new version with the site tracking. Just overwrite reports.php with this one; it includes all the updates.
    Wahoo Gimme sum credits

  5. #30
    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)
    To collaboration! Thanks for the reality check ToddW.

  6. #31
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman
    To collaboration! Thanks for the reality check ToddW.
    Time to get new reports `n check it out

  7. #32
    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)
    I'm moving the menu to the left right now, too. Waste of space as it is.

  8. #33
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman
    I'm moving the menu to the left right now, too. Waste of space as it is.
    Cool, you should use my option too.

    if ($clicks == '0') { ?>
    <? echo $page; ?>
    <?
    }
    else {
    ?>
    <a href="reports2.php?act=clicks&PageID=<? echo $data[ID] ?>&timespan=<? echo $timespan; ?>&date1=<? echo $date1; ?>&date2=<? echo $date2; ?>"><? echo $page; ?></a>
    <? } ?>


    This way the URLs don't goto no place if no adsense ad's have been clicked.



    Also, allow sorting options (Sort by Ad Clicks, Ad Views).. simple drop down menu and a variable in the sql

  9. #34
    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)
    Your wish is my command. Menu update and the zero click thing added.

  10. #35
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman
    Your wish is my command. Menu update and the zero click thing added.
    Yee-ha my own genie

  11. #36
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Sounds like maybe this should be a SourceForge project??

  12. #37
    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)
    Too complicated. And the "sort by" idea would require rewriting things to be single queries instead of queries inside query loops. Not that hard but I don't have time; I'm working on a site right now (for my job...grrr... I don't even want this job, but I can't leave them without a developer after 2+ years).

    If someone wants to overhaul reports.php to use more efficient queries without changing everything else I'd be happy to update the site with the new version.

  13. #38
    SitePoint Addict
    Join Date
    Nov 2003
    Location
    Grand Rapids, MI
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by emmzee
    One caution, just in case anyone is using this without passwording it, using a htaccess file or something to protect your stats would be an excellent idea

    I hate htaccess crap, always have. If you password it wouldn't that make the script have problems running the stats file out of that directory? Because I'd like to password mine.

  14. #39
    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)
    To password it you'd have to move tracker.php and a copy of config.php into their own non-password folder and reflect that in config.php so that the javascript points to the right tracker.php location.

  15. #40
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Cleveland, OH
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would suggest also moving the setup file as well, kids will play if you let them.

    I have a question, am I right in assuming i would need to call the goolge ads using similar iframe code to what you use on your example pages? Will that work with all the parameters? I take it this won't work with the regular look of adsense code? Or am I missing something?

    Thanks

  16. #41
    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)
    No, you do not have to modify your adsense code. The javascript provided by Google actually writes an iframe by the same name which is why it will still work. That is only there so that I can show ads from the adsense test account rather than my own, so that I do not get paid for clicks.

    If you want proof, see www.websitegoodies.com -- I didn't modify my adsense code at all, it's the exact that came out of google.com but I'm tracking it with this script.

  17. #42
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Cleveland, OH
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excellent thanks. I realize my goof, i edited the code to remove the refer tracking for some forum based ads and had left in a ' which goofed up the tracking.

    Thanks again for this great script.

    Chet

  18. #43
    Freelance Web Guy freekrai's Avatar
    Join Date
    May 2003
    Location
    Penticton,BC
    Posts
    400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an easy solution to do login to these pages without moving stuff around.

    Create a file called "accesscontrol.php"
    PHP Code:
    <?php
     $adlogin 
    "admin";
     
    $adpassword "abc123";
     if (!isset(
    $PHP_AUTH_USER)) {
      
    header('WWW-Authenticate: Basic realm="AdSense Tracker"');
      
    header('HTTP/1.0 401 Unauthorized');
      echo 
    'Authorization Required.';
      exit;
     } else if (isset(
    $PHP_AUTH_USER)) {
      if ((
    $PHP_AUTH_USER != $adlogin) || ($PHP_AUTH_PW != $adpassword)) {
       
    header('WWW-Authenticate: Basic realm="Adsense Tracker"');
       
    header('HTTP/1.0 401 Unauthorized');
       echo 
    'Authorization Required.';
       exit;
      }
     }
    ?>
    Change $adlogin and $adpassword to whatever you want them to be saved as.

    Then go into setup.php and reports.php
    Directly below this line:
    include("config.php");
    Add this line:
    include("accesscontrol.php");

    Now, it's password protected using something like .htaccess just without having to put .htaccess on the whole directory. Lets you leave all the files were they are
    Roger Stringer
    DBStract - Build a database - Gather data - View it from every angle
    Other Sites: [ 1 ][ 2 ][ 3 ][ 4 ][ 5 ]


  19. #44
    root
    Join Date
    Oct 2003
    Location
    Tampa Bay
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dan,

    I must say, excellent job. I was testing this out on a couple of my sites just to see the CTR and it works great. Thanks for making it, it's pretty useful.

  20. #45
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to make sure, could the code also be placed into PHPAdsNew (don't know why it should not work, because AdSense code can be inserted too)?

  21. #46
    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)
    I believe that should work, as long as the code is placed AFTER the adsense code. I don't use phpAdsNew so I can't test it myself.

  22. #47
    SitePoint Addict aliEn's Avatar
    Join Date
    Oct 2001
    Location
    .au/.sg
    Posts
    394
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works great. Thanks!

  23. #48
    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)
    I had someone else with phpAdsNew try out rotating both the adsense and the tracking code with pAN and he said it worked.

  24. #49
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I put the code in my new area, and it's working. Dan you rule!


    Dan did GoogleGuy say it was legal for you to accept money for developing something for adsense? Or is this against TOS

  25. #50
    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)
    I don't need Google's permission to provide a script that tracks the onfocus event of any iframe named "google_ads_frame" The guy who sells a script that does the same has been around that thread too. His service is still there, $100 a pop for the same tracking.
    Last edited by Dan Grossman; Mar 5, 2004 at 00:13.


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
  •