← Back to FinWise Hub ← Ad Setup Guide

Media.net Integration

Configure Yahoo-Bing contextual advertising

⚠️ Placeholder Status

This integration uses PLACEHOLDER VALUES. You must sign up for Media.net and replace the placeholder Config ID with your actual account credentials.

About Media.net

Media.net is a leading contextual ad network powered by Yahoo and Bing. It's often considered the second-best alternative to Google AdSense:

Signup Instructions

1Submit Application

Visit media.net/#publisher-apply and complete the application. You'll need:

2Wait for Approval

Media.net typically reviews applications within 2-7 business days. They may reach out for additional verification.

3Access Dashboard

Once approved, access your dashboard at media.net to create ad placements.

4Get Your Config ID

Your Config ID (also called Configuration ID) is found in your dashboard under each ad placement. It looks like: YOUR_MEDIA_NET_CONFIG_ID

Code Placement

Standard Display Ad Code

Place this script in your <head> section:

<!-- Media.net Contextual Ads Script - PLACEHOLDER --> <script type="text/javascript"> var contextid = 'YOUR_MEDIA_NET_CONFIG_ID'; </script> <script type="text/javascript" src="//contextual.media.net/main.js?cookieAcceptance=1"></script>

Display Ad Placement (728x90 Leaderboard)

<!-- Media.net Display Ad - 728x90 - PLACEHOLDER --> <div id="mnnative_display_ad" style="display:none"> <noscript><em>Ads are not supported for your browser at this time.</em></noscript> </div> <script type="text/javascript"> var width = window.innerWidth || document.documentElement.clientWidth; if (width >= 728 ) { nmn广告.width = '728'; nmn广告.height = '90'; nmn广告.slot = '#mnnative_display_ad'; nmn广告.execute(); } </script>

Native Ad Placement

<!-- Media.net Native Ad - PLACEHOLDER --> <div id="mnnative_native_ad"> <noscript><em>Ads are not supported for your browser at this time.</em></noscript> </div> <script type="text/javascript"> var width = window.innerWidth || document.documentElement.clientWidth; if (width >= 300) { nmnads.width = '300'; nmnads.height = '250'; nmnads.slot = '#mnnative_native_ad'; nmnads.execute(); } </script>

Where to Place Each Code

Component Placement In index.html
Script Tag Head section After other ad scripts
Display Ad Where ad displays Replace .ad-container
Native Ad In-feed or sidebar Dedicated slots

Ad Appearance

Standard Display Ads

Standard Banner Sizes

728×90 Leaderboard
300×250 MREC

Native Ads

Native ads blend seamlessly with your content and appear as sponsored content:

Native Ad Preview

Ad
5 Best High-Yield Savings Accounts
Compare rates up to 5.25% APY. No fees, FDIC insured.
Ad
Free Credit Score Check
See your score in 60 seconds. No credit card needed.

Note: Native ads include "Ad" or "Sponsored" labels for transparency.

Integration with index.html

Here's how the Media.net placeholder currently appears in index.html:

<!-- ============================================ --> <!-- MEDIA.NET PLACEHOLDER - REPLACE WHEN SIGNED UP --> <!-- ============================================ --> <!-- Media.net Script --> <script> var contextid = 'YOUR_MEDIA_NET_CONFIG_ID'; </script> <script> src="//contextual.media.net/main.js?cookieAcceptance=1"></script> <!-- Media.net Ad Placeholder --> <div class="ad-container"> <div class="ad-label">Advertisement</div> <div style="background: #e8f5e9; min-height: 90px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: #48bb78;"> Media.net Ad - Replace with your code </div> </div>

✓ After You Sign Up

Once you receive your Media.net credentials:

  1. Replace YOUR_MEDIA_NET_CONFIG_ID with your Config ID from dashboard
  2. Create ad placements in your Media.net dashboard
  3. Replace zone/placement IDs in the ad code
  4. Test ad display on your site
  5. Check your Media.net dashboard for performance