This guide will walk you through the full setup of an MGID under-article widget in Google Ad Manager. As an example, it explains how to set up an MGID 3x2 under-article widget with dimensions of 700x600 for desktop and 300x1700 for mobile, in a placement free of other GAM tags—directly under the post.
Before you begin, make sure you have the required dimensions (mobile, desktop, etc.) for accurate widget placement on the web pages, as well as the necessary tag codes—both provided by your MGID representative.
Here are the setup steps:
- Creating an ad unit in GAM;
- Implementing the GAM tag on the website;
- Configuring the Order/Line item for the MGID widget;
- Creating the ad creatives;
Creating an ad unit in GAM
Please note that you are creating a custom fixed-size ad unit, and default IAB banner formats cannot be used for this setup.
1. To create a new ad unit in GAM, navigate to the INVENTORY section in GAM interface then go to => AD UNIT => NEW AD UNIT.
2. When creating the new ad unit, keep the following in mind:- Make sure the default Parent ad unit is set to Top-level
- Ad unit name – can be any name up to 255 characters.
- Code - has a limit on which symbols can be used (i.e. no spaces).
- Sizes - this part of the ad unit is crucial. MGID native widgets require fixed sizes to be set for the GAM implementation.
- Sizes optional - please fill in the specific sizes provided by the MGID representative. In this case, we have a widget that will appear both for desktop and mobile, therefore 2 sizes need to be mentioned.
- You can leave all other optional settings as they are.
Implementing the GAM tag on the website
The ad unit you previously created has a unique tag, which can be retracted from the GAM interface.
Navigate to the INVENTORY => AD UNIT => Search field (enter the NAME of your ad unit) => Click on an Ad unit name in the list.
Follow these steps to retract the GAM tag:
- Click on the Tags tab.
- Additional settings are NOT needed unless agreed with the MGID representative beforehand. Click Continue till you get to the Tag results.
- In the Tag results section, please copy-paste (hardcode) the Header and Body codes according to the instructions into your website’s pages. The body must be set where the actual MGID widget should appear.
- In case you require the widget to run on AMP pages you will need to generate a different GAM tag. Please chose in Tag type section the option AMP tag, all other Step-by Step settings are the same as for a default GAM tag. In the Tag results section, there will be only one Body code that must be copied and pasted (hardcode) where the actual MGID widget should appear on the page.
Configuring the Order/Line item for the MGID widget
To create the Order/Line Item for MGID, navigate to the DELIVERY section of GAM:
DELIVERY => ORDER => NEW ORDER.
- Fill in the required General settings: Name and Advertiser (can be either one from the list or choose Ad New Company and follow the step-by-step instructions).
- All other optional settings can be left at their default values.
- Click “Ad Line Item” (preferred) or “Save”.
DELIVERY => ORDER => Search field (enter the NAME of the Order) => Click on Order in the list.
Creating Line Item for the Order:
-
When setting a new line item we have two Ad type options: Display and Video. Please select Display.
-
Set the Name for the new line item.
-
Choose the Priority - for the current setup, we recommend selecting Sponsorship (4).
-
Expected creatives - should be EXACTLY THE SAME as set for the Ad unit previously created. In order to make sure the correct sizes appear for the correct layout you can use Creative targeting (optional).
-
Delivery settings - are responsible for setting specific traffic volumes and rates GAM will provide for the Line item.
- Add targeting - reflects the place where we want the line item to appear (ad units, GEOs, devices etc.) This section is dedicated for linking our previously created ad unit to the current line item. Choose Inventory and in the section Ad units choose the previously created ad unit.
-
All other optional settings can be left at their default values. Click “Save”.
Once the line item is configured, the final step is to link the specific ads to it. We will need to set Creatives for this line item.
Creating the ad creatives
Creating the ad creatives can be done in the existing line item options. Navigate to: LINE ITEM => Creatives (0) => Add Creative (Or New Creative).
- After clicking Add Creative and choosing the right size, you need to choose the Third Party.
- Name - set the Name of the Creative. Choose code type - Standard
- In the script field - insert the MGID’s widget code provided by our representative.
- You can leave all other optional settings as they are. Click “Save” Note, if you are using 1x1 sizes for your ad unit, line item and creative setup - please uncheck the option Serve into SafeFrame.
- Please note, the example shows the setup for the creative meant for desktop size, same steps should be applied to set a creative for the mobile size mentioned in this example.
Please make sure your Line item has the Status Ready or Delivering.
GAM is placing our script inside the safe frame, which doesn't allow connecting the Head + Body elements of the MGID installation code outside the safe frame, hence requiring each MGID integration via GAM to have both HEAD + Body elements placed together.
In case you have Draft or other status the ads may not be serving on the webpage. You need to Activate the Order. For more details please follow the instructions from the official GAM Help guides.
Within 10-30 minutes, the MGID widget should begin displaying ads on the website.