Results 1 to 10 of 10

Thread: need help with a google ad on my page....

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Post need help with a google ad on my page....

    I just got google adsense on my page but when you click the ad it opens it in the same window. Here is what the code is:
    Code:
    <script type="text/javascript"><!--
    google_ad_client = "pub-1452497990472660";
    /* 728x90, created 7/4/08 */
    google_ad_slot = "0966636488";
    google_ad_width = 700;
    google_ad_height = 90;
    google_ad_target = blank;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    any ideas?

  2. #2
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    Please post a link to your site.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This line (if the Google script is following the generic nomenclature for this sort of thing):

    Code:
    google_ad_target = blank;
    should probably be:

    Code:
    google_ad_target = '_blank';
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    John,
    That means it is google's mistake?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by allahverdi View Post
    John,
    That means it is google's mistake?
    Assuming that's exactly the code the person got from Google, yes. However, the entire point of having a little script right on the page there is to allow for some configuration. And just to look at it, it's obvious (unless there is another script on the page before it) that blank is undefined.

    It could be that the order of the two script tags needs to be reversed, but that would mean that blank is a variable in the global scope. I don't think even Google would be that arrogant, if you catch my drift. Though I suppose it is possible.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    i just put in your code and it didnt work :/ here is a link to my site. http://www.modernrevolutions.net

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As far as I can tell, there is no:

    google_ad_target

    in the pagead2.googlesyndication.com/pagead/show_ads.js file, so it wouldn't matter what it was set for. Ask Google. However, I suspect that their policy is to open their adds in the same window.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    so there is no way for it to open in a new window? ok thanks anyway

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by IllustriousLyts View Post
    so there is no way for it to open in a new window? ok thanks anyway
    All I'm saying is that it doesn't look that way. I even looked at the pagead2.googlesyndication.com/pagead/show_ads.js file along with all the scripts associated with your page and with the inserted ads a bit more. Now, to have a new window, you need one of two things (in about the simplest terms):

    Code:
    window.open(URL)
    or:

    Code:
    something = '<a href='+URL+' target="_blank" . . .
    The scripts are condensed - use many one letter variables to represent things. But to get those, the things represented must be mentioned at least once in the scripts. There is no open and target is mentioned only once, hard coded to "_top". That makes me think even more that these scripts just weren't written to support new window.


    Google would be your best resource on this though. I am assuming you signed up to participate in the this advertising program of theirs. If so, there must be a TOS page, probably a FAQ's page, probably a forum specifically for it, perhaps even an email address you can submit questions specifically about it to.
    Last edited by jscheuer1; 07-07-2008 at 02:30 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, it cannot be done (from https://www.google.com/adsense/suppo...ui&medium=link - Google AdSense Program Policies):

    Webmaster Guidelines

    AdSense publishers are required to adhere to the webmaster quality guidelines posted at http://www.google.com/webmasters/guidelines.html.
    Site and Ad Behavior

    Sites showing Google ads should be easy for users to navigate and should not contain excessive pop-ups. AdSense code may not be altered, nor may standard ad behavior be manipulated in any way that is not explicitly permitted by Google.

    * Sites showing Google ads may not contain pop-ups or pop-unders that interfere with site navigation, change user preferences, or initiate downloads.
    * Any AdSense code must be pasted directly into webpages without modification. AdSense participants are not allowed to alter any portion of the code or change the behavior, targeting, or delivery of ads. For instance, clicks on Google ads may not result in a new browser window being launched.
    * A site or third party cannot display our ads, se . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •