Saturday, April 15, 2017

How to get Google Adsense Leaderboard working in XHTML

Getting Google Adsense working in XHTML took me a while to figure it out.  I share the process with you here...

1) Create an ad-leaderboard.html file, similar to this:

        <title>Gliesians Leaderboard</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
            <script type="text/javascript"><!--
   google_ad_client = "ca-pub-XXXXXXXXXXXXXXXX";
                /* Mobile Ad */
                google_ad_slot = "XXXXXXXXXX";
                google_ad_width = 728;
                google_ad_height = 90;
            <script type="text/javascript"

2) Call the ad-leaderboard.html file from your xhtml file like this:

  <object data="/ad-leaderboard.html" type="text/html" style="width: 790px; height: 135px; padding: 0; ">

That's it!  If you have any issues getting it to work, let me know and I'll try to help.

No comments:

Post a Comment

Gary Vale's, "Blade 200 S Lift Off Demo" Video

I've been doing a lot of flights with my Blade 200 S RC Helicopters... Gary Vale just made a really great demonstration of lifting off...