---
title: Instalasi Kode Widget MGID di Situs Web WordPress
description: Kode widget MGID (Simple JS) adalah kode instalasi MGID di tingkat situs web yang digunakan oleh penerbit untuk mengintegrasikan widget pada situs web. Berbeda dengan kode instalasi standar, tag Simpl
---

[Lewati ke konten](https://help.mgid.com/id/instalasi-kode-widget-mgid-di-situs-web-wordpress#main-content)

- [Bahasa Indonesia](https://help.mgid.com/id/instalasi-kode-widget-mgid-di-situs-web-wordpress)
- [English](https://help.mgid.com/how-to-add-widgets-to-wordpress)
- [Español](https://help.mgid.com/es/cómo-implementar-el-bloque-de-anuncios-de-mgid-en-wordpress)
- [Français](https://help.mgid.com/fr/installation-du-code-des-widgets-mgid-sur-les-sites-wordpress)
- [Italiano](https://help.mgid.com/it/come-aggiungere-un-widget-mgid-in-wordpress)
- [Polski](https://help.mgid.com/pl/instalacja-kodu-widgetu-mgid-na-stronach-internetowych-wordpress)
- [Português - Brasil](https://help.mgid.com/pt-br/como-adicionar-uma-unidade-de-anúncio-da-mgid-no-wordpress)
- [Tiếng Việt](https://help.mgid.com/vi/cách-để-thêm-widgets-của-mgid-trên-wordpress)
- [Українська](https://help.mgid.com/uk/як-додати-віджет-mgid-у-wordpress)
- [ไทย](https://help.mgid.com/th/วิธีการเพิ่มวิดเจ็ต-mgid-ใน-wordpress)

Bahasa Indonesia

Tampilkan submenu untuk terjemahan

![MGID\_Logo\_Help\_Center\_W\_R\_Swoosh.svg\]](https://help.mgid.com/hubfs/MGID_Logo_Help_Center_W_R_Swoosh.svg)

- [Advertisers](https://www.mgid.com/advertisers)
- [Publishers](https://www.mgid.com/publishers)
- [Contact Us](https://www.mgid.com/about#tabs-contactus)

Buka navigasi utama

Tutup navigasi utama

- [Advertisers](https://www.mgid.com/advertisers)
- [Publishers](https://www.mgid.com/publishers)
- [Contact Us](https://www.mgid.com/about#tabs-contactus)
- - [Bahasa Indonesia](https://help.mgid.com/id/instalasi-kode-widget-mgid-di-situs-web-wordpress)
    - [English](https://help.mgid.com/how-to-add-widgets-to-wordpress)
    - [Español](https://help.mgid.com/es/cómo-implementar-el-bloque-de-anuncios-de-mgid-en-wordpress)
    - [Français](https://help.mgid.com/fr/installation-du-code-des-widgets-mgid-sur-les-sites-wordpress)
    - [Italiano](https://help.mgid.com/it/come-aggiungere-un-widget-mgid-in-wordpress)
    - [Polski](https://help.mgid.com/pl/instalacja-kodu-widgetu-mgid-na-stronach-internetowych-wordpress)
    - [Português - Brasil](https://help.mgid.com/pt-br/como-adicionar-uma-unidade-de-anúncio-da-mgid-no-wordpress)
    - [Tiếng Việt](https://help.mgid.com/vi/cách-để-thêm-widgets-của-mgid-trên-wordpress)
    - [Українська](https://help.mgid.com/uk/як-додати-віджет-mgid-у-wordpress)
    - [ไทย](https://help.mgid.com/th/วิธีการเพิ่มวิดเจ็ต-mgid-ใน-wordpress)

  Bahasa Indonesia
  
  Tampilkan submenu untuk terjemahan
- Hubungi kami

 Hubungi kami

 Welcome to MGID! How can we help you?

- Tidak ada saran karena bidang pencarian kosong.

1. [Help Center Home](https://help.mgid.com/id?hsLang=id)
2. [Pengembang](https://help.mgid.com/id/pengembang?hsLang=id)
3. [Jenis integrasi](https://help.mgid.com/id/pengembang?hsLang=id#jenis-integrasi)

# Instalasi Kode Widget MGID di Situs Web WordPress

### Pengantar

Kode widget MGID (Simple JS) adalah kode instalasi MGID di tingkat situs web yang digunakan oleh penerbit untuk mengintegrasikan widget pada situs web. Berbeda dengan kode instalasi standar, tag Simple JS dirancang agar ringan dan efisien. Ini memastikan dampak minimal pada kinerja situs dan menghindari langkah-langkah tambahan dari sisi penerbit.

Kode instalasi yang ditampilkan dalam panduan ini hanya untuk tujuan ilustrasi. Selalu salin kode instalasi yang dibuat untuk akun Anda dari dasbor, karena setiap kode instalasi bersifat unik untuk pengaturan Anda.

Ganti {your\_website\_id} dan {your\_widget\_id} dengan nilai yang diperoleh dari Dashboard - Widgets - Get code.

Kode instalasi widget mengandung dua bagian:

1. Bagian JS di website \<Head\> (skrip di tingkat situs web):

 HEADPart**:**

```
<script src="https://jsc.mgid.com/site/{your_website_id}.js" async></script>
```

 2\. Tag BODY untuk penempatan widget (tempat di mana widget akan ditampilkan):

BODY Part:

```
<!-- place in the body --> <div data-type="_mgwidget" data-widget-id="{your_widget_id}"></div><script>(function(w,q){w[q]=w[q]||[];w[q].push(["_mgc.load"])})(window,"_mgq");</script>
```

### **Cara mengintegrasikan kode widget MGID (Simple JS) di situs web WordPress**

Untuk mengintegrasikan kode widget MGID yang berfungsi sebagai solusi monetisasi di situs web WordPress, ikuti langkah-langkah ini:

1. Instal Plugin Ad Inserter gratis dari situs web WordPress:

- Arahkan ke menu Plugin WordPress (​​[https://wordpress.com/plugins](https://wordpress.com/plugins))
- Cari Ad Inserter ([https://wordpress.com/plugins/ad-inserter](https://wordpress.com/plugins/ad-inserter))
- Unduh dan instal plugin
- Aktifkan Ad Inserter di dashboard Plugin

![wordpress\_1](https://help.mgid.com/hs-fs/hubfs/1.%20Help%20Center%20(website)/Publishers/WordPress/wordpress_1.png?width=670&height=433&name=wordpress_1.png)

Pelajari lebih lanjut tentang Instalasi Plugin WordPress di [sini.](https://adinserter.pro/documentation/plugin-installation)

 2\. Tambahkan bagian BODY dari kode widget MGID di bagian penempatan kode plugin Ad Inserter:

- Gunakan daftar drop-down Insertion untuk memilih di mana widget harus ditampilkan di situs web (misalnya setelah posting)
- Klik Simpan Pengaturan (Save Settings)

![wordpress\_2](https://help.mgid.com/hs-fs/hubfs/1.%20Help%20Center%20(website)/Publishers/WordPress/wordpress_2.png?width=670&height=420&name=wordpress_2.png)

 3\. Untuk menyelesaikan pengaturan, tambahkan kode widget MGID di bagian HEAD halaman:

- Klik ikon pengaturan

![wordpress\_3](https://help.mgid.com/hs-fs/hubfs/1.%20Help%20Center%20(website)/Publishers/WordPress/wordpress_3.png?width=670&height=545&name=wordpress_3.png)

- Pilih bagian Header 
- Tempelkan skrip Head

![wordpress\_4](https://help.mgid.com/hs-fs/hubfs/1.%20Help%20Center%20(website)/Publishers/WordPress/wordpress_4.png?width=670&height=579&name=wordpress_4.png)

- Klik ikon "Enable Insertion of this code into HTML page header."

![wordpress\_6](https://help.mgid.com/hs-fs/hubfs/1.%20Help%20Center%20(website)/Publishers/WordPress/wordpress_6.png?width=670&height=509&name=wordpress_6.png)

- Simpan Pengaturan (Save Settings).

Jika Anda ingin menambahkan lebih banyak widget, Anda hanya perlu menambahkan bagian kode \<body\> dari widget baru ke blok berikutnya. Berikut adalah contoh unit kedua, widget dampak dalam artikel.

![wordpress\_7](https://help.mgid.com/hs-fs/hubfs/1.%20Help%20Center%20(website)/Publishers/WordPress/wordpress_7.png?width=576&height=752&name=wordpress_7.png)

**Panduan Video**  
Klik gambar mini di bawah ini untuk mengakses panduan video.

<iframe width="256" height="144.64" src="https://www.youtube.com/embed/3_NFKje1bw8?list=PLTP3I1dve8FIX3XKsGUTUq3fDv5F37S-e" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; border: none;"></iframe>

 

- [Pengembang](https://help.mgid.com/id/pengembang?hsLang=id#main-content)

    - [Umum](https://help.mgid.com/id/pengembang?hsLang=id#umum)
    - [Konten dan praktik yang dilarang](https://help.mgid.com/id/pengembang?hsLang=id#konten-dan-praktik-yang-dilarang)
    - [Jenis integrasi](https://help.mgid.com/id/pengembang?hsLang=id#jenis-integrasi)
    - [Dibayar](https://help.mgid.com/id/pengembang?hsLang=id#dibayar)
    - [FAQ](https://help.mgid.com/id/pengembang?hsLang=id#faq)

- [Advertisers](https://www.mgid.com/advertisers)
- [Publishers](https://www.mgid.com/publishers)
- [Contact Us](https://www.mgid.com/about#tabs-contactus)

[![Chill listening crop-3](https://help.mgid.com/hubfs/MGID_Logo_Icon_HC.svg "Chill listening crop-3")](https://www.mgid.com)

Native performance through innovation

Hak Cipta © 2026, MGID Inc.