MGID Widget Code Installation on WordPress Websites


MGID widget code (Simple JS) is a website-level MGID installation code that publishers use to integrate widgets on a website. Unlike standard installation code, the Simple JS tag is designed to be lightweight and efficient. It ensures minimal impact on site performance and avoids extra steps from the publisher's end. 

The widget installation code contains two pieces:

  1. JS part in the website <Head> (website level script):

HEAD Part:

<script src="" async></script>
2. Body tag for widget placement (where the widget will be shown):

BODY Part: 

<!-- place in the body --> <div data-type="_mgwidget" data-widget-id="868490"></div>


How to integrate MGID widget code (Simple JS) on WordPress websites

To integrate MGID widget code, which works as a monetization solution on WordPress websites, follow these steps:

1) Install a free Ad Inserter Plugin from the WordPress website:


Learn more details about the WordPress Plugins Installation HERE

2) Add the BODY part of the MGID widget code in the code placement section of the Ad Inserter plugin:

  • Use the Insertion drop-down list to select where widgets should be shown on the website (e.g. after the post)
  • Click Save Settings


3) To complete the setup, add the MGID widget code in the HEAD of the page:

  • Click on the settings icon


  • Select the Header section
  • Paste the Head script


  • Click on the icon "Enable Insertion of this code into HTML page header."


  • Save Settings.

If you want to add more widgets, you only have to add the <body> code part of a new widget into the next block. Here is an example of the second unit, the impact in-article widget.


Video Guide

Click the thumbnail below to access the video guide.