Dragos Vana
Dragos Vana

Reputation: 66

Can I place Google Adsense Ads in Facebook Instant Articles despite the Iframes?

I am implementing Facebook Instant Articles for my website and have come across the following problem.

Facebook says you can implement any ad code you wish, even Google Double Click for Publishers which uses Adsense as it's default backup when no ads from your current inventory are being served, but the code is inside an iframe as such:

<figure class="op-ad">
    <!-- Use this for your ads -->
    <iframe src="" height="50" width="320"></iframe>
</figure>

The thing is, I use Google Adsense for my ads and there is a problem with iframes:

http://adsense.blogspot.ro/2011/06/clarifying-our-ad-implementation.html

Anybody know how it's possible to solve this dilemma?

Upvotes: 2

Views: 12515

Answers (3)

Diego Gaona
Diego Gaona

Reputation: 520

you can use your Adsensse tag. It worked fine for me, using a iframe.

Don't forget to use this in the article header:

<meta property="fb:use_automatic_ad_placement" content="true">

Here is a example of the tag:

<figure class="op-ad">

      <iframe height="250" style="border:0;margin:0;padding:0;" width="300">

      <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

   <ins class="adsbygoogle"

     style="display:inline-block;width:300px;height:250px"

     data-ad-client="ca-pub-XXXXXXXXXXXX"

     data-ad-slot="XXXXXXXXXXX"></ins>

<script>

(adsbygoogle = window.adsbygoogle || []).push({});

</script>

    </iframe>

</figure>

Putting a context, your code would be like this:

    <!doctype html>
    <html lang="pt-br" prefix="op: http://media.facebook.com/op#">
    <head>
      <meta charset="utf-8">
      <link rel="canonical" href="https://yoursite/your-article/">
     <meta property="fb:use_automatic_ad_placement" content="true">

       <meta property="fb:article_style" content="default">

       <meta property="op:markup_version" content="v1.0">
    </head>
    <body>

        <article>
            <header>
                <!-- cover -->
                  <figure class="op-ad">

          <iframe height="250" style="border:0;margin:0;padding:0;" width="300">

          <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

    <!-- 300x250 - Rodapé Texto -->

    <ins class="adsbygoogle"

         style="display:inline-block;width:300px;height:250px"

         data-ad-client="ca-pub-XXXXXXXXXXXX"

         data-ad-slot="XXXXXXXXXXX"></ins>

    <script>

    (adsbygoogle = window.adsbygoogle || []).push({});

    </script>

        </iframe>

    </figure>
                                <figure>
                        <img src="https://yoursite/your-article/image.jpg" />

                                        </figure>

                <!-- The title and subtitle shown in your Instant Article -->
                <h1>Title;</h1>

                <!-- author(s) -->
                <address>
                    Writen by <a>Author</a>
                                </address>

                <!-- publication date/time -->
                <time class="op-published" datetime="2016-08-16T17:47:42+00:00">16 ago 2016</time>

                <!-- modification date/time -->
                <time class="op-modified" datetime="2016-08-16T17:47:42+00:00">16 ago 2016</time>

            </header>

 <!-- Article body goes here (CONTINUE LIKE A NORMAL INSTANT ARTICLE) -->

Upvotes: 0

Collin Krawll
Collin Krawll

Reputation: 2530

AdPlugg can do this. Your tag above would become:

<figure class="op-ad">
    <!-- Use this for your ads -->
    <iframe src="http://www.adplugg.com/serve/<your_adplugg_access_code>/html/1.1/index.html?zn=fb_zone_1" height="50" width="320"></iframe>
</figure>

You would then drop your AdSense tag into a "Custom" AdPlugg ad and configure it to serve into your "fb_zone_1" AdPlugg Zone (as specified in the example url above).

With this solution, you could rotate other ads (affiliate network, direct buy, etc) into the zone if you wanted. It would also allow you to update your ads without having to update your entire Instant Articles feed.

I posted a blog with more info about how to do it here: Facebook Instant Article Ads

A similar question (which might be of help) was asked/answered here: Add DFP DoubleClick inside a Facebook Instant article

Disclaimer: I work for AdPlugg.


Update: It seems that the current Facebook Instant Articles Policies only allow serving Direct Sold ads or Facebook Audience Network ads. No other ad networks are allowed. Under these policies, you could still use AdPlugg but only to serve ad inventory that you directly sold to Advertisers and not AdSense ads.

Upvotes: 1

Dan
Dan

Reputation: 11

"""Facebook says you can implement any ad code you wish, even Google Double Click for Publishers which uses Adsense as it's default backup."""

You are not allowed to use adsense as the default backup. It is a violation of rule.

Upvotes: 1

Related Questions