AdSense mass implementation -- solution & coding tips

Discussion in 'AdSense' started by vinyl, Dec 8, 2005.

  1. #1
    Lets say I have 100k pages in which I need to put AdSense ads -- all pages have different layout (position of text/navigation etc.) cause they all belong to different portion of site, which required different navigation/content approach.

    Instead of modifying each portion's layout and have numerous of to-do's, per each portion, I need to do something fast & effective (read: something which fully respects AdSense TOS, consisting of single [HTML/js] include for all pages, no matter how they look)

    From technical part of view, all my hopes lie in including something widely, something = some HTML code, of course. Lets say its PHP include, but its really irrelevant now -- the important thing is - what to include to get necessary functionality? Floating div? Or something else?
     
    vinyl, Dec 8, 2005 IP
  2. Knertified

    Knertified Guest

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you want to do it right (in my opinion), this is what I would do because I know PHP and MySQL:

    1. Create a database table that holds your banners code from google and assign the code a unique id.

    2. Update your html files and place a variable (i.e. $banner_top) where you want the top banner to show up.

    3. Write a PHP program connect to your database table and pull all your banners and assign them to variables: ($banner_top, $banner_bottom, etc). The PHP program will then eval the HTML file. This will replace $banner_top with the google code that is in your database.

    NOTE: Your site will have to call the PHP program for now on and not the HTML file. You will have to update links on your website.

    You may also want to look into some sort of content management system for these sites so you can manage them easier.
     
    Knertified, Dec 8, 2005 IP
  3. Evoleto

    Evoleto Well-Known Member

    Messages:
    253
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #3
    You may also want to try a so-called ad server for this purpose; you will ba able to manage campaigns and also you may use standard banners for other advertisers.

    Two very good open source ad servers are phpMyAds and phpAdsNew.

    Good luck!
     
    Evoleto, Dec 8, 2005 IP
  4. vinyl

    vinyl Well-Known Member

    Messages:
    302
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    165
    #4
    This is the step where we dont understand each other -- instead of even thinking about different ad types and different possition on pages, I need something unique for all of them, something which is not hard-coded per page and which doesnt have fixed possition.

    The basic is that I DONT want to make place for AdSense ad. (its more that I CANT, cause its extremly complex task having in mind tight/different content structure & amount of pages) I want everything to remain the same on all pages, without devoting a single pixel to AdSense, yet, I do want to run ads on pages.

    Sounds impossible? Well... if ads fly, its possible, LOL

    Now, the question is, whether such approach (adding flying div with AdSense in it on numerous of different pages) is OK with G and whether that can be done widely, with single code inclusion, somewhere between <body> and </body>?
     
    vinyl, Dec 10, 2005 IP
  5. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Just put the adsense in a file and call it with an includes wherever you want the code.
     
    mdvaldosta, Dec 10, 2005 IP
  6. MattEvers

    MattEvers Notable Member

    Messages:
    1,792
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #6
    Um, you want the ads to be like a pop-up or one of those sliding ads? If so, I don't think that is compliant with the TOS....:rolleyes:
     
    MattEvers, Dec 10, 2005 IP
  7. Crusader

    Crusader Peon

    Messages:
    1,735
    Likes Received:
    104
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry to dissapoint you, but that will fall into the category of a major ToS violation. Google doesn't allow you to place Adsense ads in such a way that it obscures the content of a site (e.g floating divs)
     
    Crusader, Dec 11, 2005 IP