MGID Widget Code Installation on WordPress Websites

Introduction

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="https://jsc.mgid.com/site/198602.js" 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>

<script>(function(w,q){w[q]=w[q]||[];w[q].push(["_mgc.load"])})(window,"_mgq");</script>

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:

wordpress_1

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

wordpress_2

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

  • Click on the settings icon

wordpress_3

  • Select the Header section
  • Paste the Head script

wordpress_4

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

wordpress_6

  • 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.

wordpress_7

Video Guide

Click the thumbnail below to access the video guide.