How to Add In-Article & In-Feed Ads How to Add In-Article & In-Feed Ads

How to Add In-Article & In-Feed Ads

Vijay Sharma Vijay Sharma

Advertise in articles and feeds by integrating your DFP display ads 

A great way to monetize your content is by integrating your DFP display ads into your feeds and article.

How to set up Google DFP ads

  1. Navigate to App CreatorAds, then select Display Ads.

  2. For the field, Google Ad Manager(DFP) toggle to Enabled

1.png

 

3. Enter the following metadata:

  • Ad Type: Google Ad Manager Native and/or Google Ad Manager Banner
  • DFP Banner ID
  • Banner Sizes (320 x 50, 320 x 100, 300 x 250) - select all that apply
  • In-Feed Frequency: Choose from every 1 to 20 feed items
  • Start: Chose from after 1 to 20 feed items
  • In-Article Ad Type: Ad Sense and/or Google Publisher Tag

Don't have a Google AdSense Account yet? Start here.

2.png

In-Article Ads

 

 

3.png

In-Feed Ads

 

Important Note:

With the release of iOS 14 and tvOS 14, Apple has introduced the AppTrackingTransparency framework. As per Apple's new guidelines, apps will need to request permission to track the user and access the device’s advertising identifier to display personalized ads.

Due to this, if your MAZ app is already on the Apple App Store and you decide to turn on or turn off ads on the MAZ dashboard, an app update will be required for iOS/tvOS apps to comply with the new guidelines.

After enabling or disabling ads on the MAZ Dashboard, please write to us at submissions@mazsystems.com to request an app update for your iOS/tvOS app.

 

Modifying Snippets for App Tracking Transparency
Ad snippets will require certain lines of code to work so that in-article ads will be based on the end-user's consent given in the App Tracking Transparency alert on iOS. Please be sure to follow these steps and add these required lines:

GPT Ads:
1. Within the snippet, locate <script> block that has the addService(googletag.pubads()) function call.

2. Add the following lines of code to the beginning of the <script> block:

var npa=window.location.href.split('npa=')[1];
if (npa != 'undefined' || npa != undefined)
{
npa = parseInt(npa);
}
else {
npa = 0;
}

3. Then replace addService(googletag.pubads()) with 

addService(googletag.pubads().setRequestNonPersonalizedAds(npa))

4. Save your snippet with these modifications by hitting the save button.

Adsense Ads:
1. Within the snippet, locate <script> block.

2. Add the following lines of code to the beginning of the <script> block:

var npa=window.location.href.split('npa=')[1];
if (npa != 'undefined' || npa != undefined)
{
npa = parseInt(npa);
}
else {
npa = 0;
}
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=npa;

3. Save your snippet with these modifications by hitting the save button.