Cara Agar Iklan Adsense Lolos Validasi W3C

Discussion in 'Search Engine Optimization' started by Qoeple, Mar 4, 2016.

  1. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    Hallo Warga Bersosial,

    Sekedar sharing hasil ngoprek di Blog Drupal saya yang tampilannya masih culun ini, yaitu Cara Membuat Iklan Adsense Agar Lolos Validasi W3C. Mungkin sudah jarang yang memperhatikan validasi ini, atau bahkan sudah gak perduli lagi dengan validasi W3C. Pada dasarnya Google pun tidak begitu memperdulikan kode javascript dari Adsense ini terkait dengan W3C. Sering saya melihat di forum Adsense mereka justru balik menanyakan kepada Si Penanya tentang apa gunanya Validasi W3C ini.

    Karena Theme / Template yang saya pakai di Blog Drupal ini menggunakan markup XHTML yang lebih ketat dibandingkan dengan HTML, maka pada kode iklan Adsense pun mesti dirubah agar bisa lolos validasi W3C. (Sotoy Mode ON !!)

    Perubahan kode Adsense sebenarnya tidak diperbolehkan oleh Google, namun ternyata mereka memberikan kelonggaran asalkan perubahan kode tersebut tidak berlebihan seperti keterangan mereka disini. Akhirnya saya pun memberanikan diri untuk merubah kode adsense standard agar bisa lolos validasi W3C.

    Mari sebelumnya kita lihat perbedaan antara kode Adsense Standard dan modifikasinya.
    Berikut contoh kode Adsense Standard yang biasa kita pakai :

    Code:
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- Gambar - Umum - Responsive (BLUE) -->
    <ins class="adsbygoogle"
      style="display:block"
      data-ad-client="ca-publisher-id"
      data-ad-slot="4975030027"
      data-ad-format="auto"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    
    Berikut contoh kode perubahan yang diperbolehkan Google :
    Code:
    <script type="text/javascript">
        var channel_condition = object.booleanMethod();
        google_ad_client = "ca-publisher-id";
        google_ad_slot = "1234567890";
        google_ad_width = 728;
        google_ad_height = 90;
        if (channel_condition){
            google_ad_channel = "123457789";
        } else {
            google_ad_channel = "263477489";
        }
    
    </script>
    <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    
    Berikut kode perubahan yang lolos validasi W3C (Hasil mulung) :D
    Code:
    <script type="text/javascript">/*<[CDATA[*/ 
    google_ad_client = "ca-publisher-id"; 
    google_ad_width = 728; 
    google_ad_height = 90; 
    google_ad_format = "728x90_as"; 
    google_color_border = "FFA41B"; 
    google_color_bg = "FFFFFF"; 
    google_color_link = "0000FF"; 
    google_color_url = "FF0000"; 
    google_color_text = "000000"; 
    /*]]>*/</script> 
    
    <script 
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js" 
    type="text/javascript" 
    ></script>
    
    Ternyata setelah saya amati perbedaannya adalah pada kode :
    • type="text/javascript"
    • /*<[CDATA[*/
    • /*]]>*/

    Alhasil, Blog culun saya ini sudah lolos validasi W3C walau terdapat iklan Adsense. Buat yang masih memperdulikan W3C silahkan coba kode diatas.
     
    budiw92 likes this.
  2. wrep17

    wrep17 Well-Known Member

    Joined:
    Sep 26, 2015
    Messages:
    1,325
    Likes Received:
    246
    Trophy Points:
    63
    Google+:
    Apa itu W3C dan apa itu Validasi W3C?
     
  3. MaxiHendra90

    MaxiHendra90 Member

    Joined:
    Jan 23, 2016
    Messages:
    197
    Likes Received:
    19
    Trophy Points:
    18
    iah apaan itu gan ??
     
  4. budiw92

    budiw92 Member

    Joined:
    Feb 11, 2013
    Messages:
    724
    Likes Received:
    35
    Trophy Points:
    28
    Google+:
    wah gak punya blog drupal saya mas
     
  5. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    World Wide Web Consortium (W3C) adalah organisasi utama standar internasional untuk web kalau kata wikipedia
    Validasi W3C : Pengecekan struktur kode markup pada tool milik mereka disini : https://validator.w3.org/
     
  6. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    Saya juga baru nyoba-nyoba, ternyata Drupal itu ribet bgt :D
     
  7. MaxiHendra90

    MaxiHendra90 Member

    Joined:
    Jan 23, 2016
    Messages:
    197
    Likes Received:
    19
    Trophy Points:
    18
    ternyata artinya itu, makasih ya informasinya,
     
  8. KangAndre

    KangAndre Member

    Joined:
    Jan 25, 2014
    Messages:
    10,253
    Likes Received:
    2,716
    Trophy Points:
    413
    Kok tanggung cuma adsense? Sekalian aja valid-kan yang ada di header :)
     
  9. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    Yang mananya yak @KangAndre ?
     
  10. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    Oke Gan, BTW Blog ente keren-keren banget itu dah ah konten nya :D
     
  11. DwiKhasbullah

    DwiKhasbullah Well-Known Member

    Joined:
    Aug 7, 2014
    Messages:
    1,955
    Likes Received:
    138
    Trophy Points:
    63
    Ikut meramaikan semoga bisa dapat Ilmu tentang Drupal.. soalnya belum pernah nyobak heheh
     
  12. holisah

    holisah Member

    Joined:
    Nov 12, 2015
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    mantap tips nya, sayang saya gk punya drupal. kayak nya ribet juga hehe
     
  13. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    He.3x sip Gan, saya juga baru belajar ini..

    Hooh, kalau tujuan utamanya sekedar Blogging better jangan pakai Drupal Neng, pegel soalnya :D
     
  14. DwiKhasbullah

    DwiKhasbullah Well-Known Member

    Joined:
    Aug 7, 2014
    Messages:
    1,955
    Likes Received:
    138
    Trophy Points:
    63
    Kalau pegel dipijitin kang.. biar gak pegel lagi... emang bener katanya ini modelnya susah banget apalagi kalau gak punya basic sama sekali sebelumnya kayak saya.... :D:D:D
     
  15. Ahmad Mujib

    Ahmad Mujib Member

    Joined:
    Mar 7, 2016
    Messages:
    214
    Likes Received:
    15
    Trophy Points:
    18
    Google+:
    Takut melanggar TOS gan, krna blm ahli JS,,,hhee
     
  16. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    Saya juga gak ada basic Drupal, makanya pegel.. He.3x
    Untungnya juragan @Dan mainannya Drupal, kalau lagi mentok paling tanya dia *jail*
     
  17. Qoeple

    Qoeple Member

    Joined:
    Nov 21, 2015
    Messages:
    551
    Likes Received:
    90
    Trophy Points:
    28
    Google+:
    Saya juga ngeri aslinya, cuma pas saya lihat coding nya mirip2 dengan yang diperbolehkan jadi saya berani..
    Paling kalau melanggar dikirim email pelanggaran dulu, gak akan langsung Banned kecuali manipulasi Klik :D
     
  18. DwiKhasbullah

    DwiKhasbullah Well-Known Member

    Joined:
    Aug 7, 2014
    Messages:
    1,955
    Likes Received:
    138
    Trophy Points:
    63
    Wkwkwk enak mah kalau dekat rumahnya pasti setiap hari kesana buat nimba Ilmu... *belajar*
     
  19. muna dl

    muna dl Member

    Joined:
    Apr 17, 2015
    Messages:
    167
    Likes Received:
    9
    Trophy Points:
    18
    Baru tahu saya,,,Nambah ilmu
     
Loading...

Share This Page