Home/Guides/Journey Mediavine Guide
Developer Guideβ€’Updated Dec 7, 2025β€’15 min read

Monetizing Your Next.js Website with Journey by Mediavine

Next.js Journey by Mediavine Approval and Implementation

A step-by-step developer guide to implementing, configuring, and optimizing Journey ads on your Next.js application.

Introduction

Journey by Mediavine (formerly known as Grow) is a premium ad management platform that offers higher RPMs than traditional ad networks like Google AdSense. Unlike AdSense, Journey uses advanced header bidding technology, which allows multiple ad exchanges to compete for your ad inventory in real-time.

This guide walks you through the complete process of implementing Journey on a Next.js website, with special focus on:

  • Script Integration - How to properly add Journey code to a Next.js app
  • Sidebar Targeting - Enabling Journey to recognize and monetize your sidebar
  • SEO Considerations - Maintaining site performance and Core Web Vitals
  • Dashboard Configuration - Setting up your Journey account for maximum revenue

Prerequisites

Before you begin, ensure you have:

  • βœ… A Next.js 13+ application (App Router or Pages Router)
  • βœ… At least 10,000 monthly sessions (Journey's minimum requirement)
  • βœ… Quality, original content
  • βœ… A properly configured sitemap.xml
  • βœ… Mobile-responsive design
  • βœ… HTTPS enabled on your domain

Phase 1: Applying to Journey by Mediavine

Step 1.1: Create Your Account & Check Eligibility

  1. Visit Journey by Mediavine
  2. Click "Apply Now"
  3. Submit your website URL and traffic analytics

πŸ“Š Traffic Requirement Note

While the standard requirement is 10,000 monthly sessions, Journey sometimes accepts websites with lower traffic if the traffic quality is high and originates primarily from Tier 1 countries (USA, Canada, UK, and Australia). Don't hesitate to apply if you have quality content but are slightly under the limit.

Step 1.2: The Approval Process

  • Verification: You must install the Grow.me verification script (see Phase 2) to prove ownership.
  • Review: Mediavine checks your content quality and traffic sources.
  • Timeline: Approval typically takes 3-7 business days.

Phase 2: Adding Journey Scripts to Next.js

There are two distinct scripts involved in the process: one for verification (before approval) and one for ads (after approval).

Step 2.1: Site Verification Script (Pre-Approval)

Immediately after applying, you need to add this script to your layout.tsx to verify site ownership. Use the exact code below, helping Journey verify your site:

{/* Journey by Mediavine (Grow.me) - Site Verification */}
<script
  data-grow-initializer=""
  dangerouslySetInnerHTML={{
    __html: `
      !(function() {
        window.growMe || (window.growMe = function(e) {
          window.growMe._.push(e);
        }, window.growMe._ = []);
        
        var e = document.createElement("script");
        e.type = "text/javascript";
        e.src = "https://faves.grow.me/main.js";
        e.defer = true;
        e.setAttribute("data-grow-faves-site-id", "YOUR_SITE_ID_HERE"); // <-- REPLACE THIS ID
        
        var t = document.getElementsByTagName("script")[0];
        t.parentNode.insertBefore(e, t);
      })();
    `,
  }}
/>

Action: Replace YOUR_SITE_ID_HERE with the ID provided in your Journey dashboard during setup.

Step 2.2: Ad Script (Post-Approval)

Once you receive the "Congratulations!" email, you'll need to add the ad script. This is what actually displays the ads.

Add this Script component to your app/layout.tsx, preferably below the verification script:

{/* Journey by Mediavine Code - to show Ads */}
<Script
  id="mediavine-journey"
  src="https://scripts.scriptwrapper.com/tags/YOUR_TAG_ID_HERE.js" // <-- REPLACE THIS ID
  data-noptimize="1"
  data-cfasync="false"
/>

Action: Replace YOUR_TAG_ID_HERE with the unique ID from your approval email or dashboard (the part after tags/).

Phase 3: Sitemap Configuration

A well-structured sitemap helps Journey understand your content. Create a dynamic sitemap in Next.js:

// app/sitemap.ts
import { MetadataRoute } from "next";

export default function sitemap(): MetadataRoute.Sitemap {
  const baseUrl = "https://gpacalculators.net";
  
  const pages = [
    "",
    "/about",
    "/calculator-1",
    "/calculator-2",
  ];
  
  return pages.map((route) => ({
    url: `${baseUrl}${route}`,
    lastModified: new Date().toISOString(),
    changeFrequency: route === "" ? "daily" : "weekly",
    priority: route === "" ? 1.0 : 0.8,
  }));
}

Phase 5: Configuring Journey Dashboard

Configuring the Sidebar Selector

This is the most critical step for sidebar ads:

  1. Log in to your Journey Dashboard
  2. Navigate to Settings β†’ Ad Placements
  3. Find "Sidebar Selector"
  4. Enter your CSS selector:
.sidebar-main, .mv-sidebar, aside[role="complementary"]

Enabling Ad Types

Ad TypeDescriptionRecommendation
In-Content AdsBetween paragraphsβœ… Enable
Sticky SidebarFollows scroll on desktopβœ… Enable
Anchor AdsFixed to bottomβœ… Enable
Video AdsCorner video playerβœ… Enable (Higher RPM)
Recommended ContentContent suggestionsβœ… Enable

Phase 6: Verification and Troubleshooting

Verifying Script Installation

Open your browser's Developer Tools (F12) and check:

// In Console tab
console.log(window.growMe);  // Should return a function

// Check sidebar elements
document.querySelectorAll('.sidebar-main, .mv-sidebar').length;
// Should return 1 or more

Timeline for Ad Appearance

  • Anchor Ads: Immediate (within hours)
  • In-Content Ads: 24-48 hours
  • Sidebar Ads: 24-72 hours
  • Video Ads: 24-48 hours
  • Recommended Widget: Immediate

βœ… Success Indicator

If you see the "Recommended Content" widget appearing in your sidebar, your sidebar selector is working correctly. The sticky ad will follow within 24-72 hours.

Best Practices

Performance Optimization

  • Use afterInteractive loading strategy to prevent blocking page render
  • Lazy load below-fold content to improve Core Web Vitals
  • Reserve space for ads with minHeight to minimize layout shifts

Revenue Optimization

  • Content length matters - Longer pages = more ad slots
  • Regular content updates - Fresh content attracts more traffic
  • Mobile optimization - Growing share of ad revenue
  • Multiple pages - More pageviews = more impressions

Common Issues and Solutions

Issue: Sidebar Ads Not Appearing

Symptoms: Recommended widget shows, but no sticky ad

Solutions:

  • Check if sidebar has position: sticky or fixed (remove it)
  • Verify overflow: visible is set
  • Wait 24-48 hours for new placements to fill
  • Ensure sidebar is tall enough (at least 600px)

Issue: Layout Shift from Ads

Symptoms: Content jumps when ads load

Solution: Add minHeight to ad containers:

<div id="sidebar_atf_target" style={{ minHeight: "250px" }} />

Summary Checklist

  • ☐ Journey script added to layout.tsx with afterInteractive strategy
  • ☐ Site ID is correct in the script
  • ☐ Sidebar component uses position: relative (NOT sticky)
  • ☐ Sidebar has overflow: visible
  • ☐ Target divs have proper IDs (sidebar_atf_target, sidebar_btf_target)
  • ☐ ARIA attributes added to <aside> elements
  • ☐ CSS selector configured in Journey dashboard
  • ☐ Ad types enabled in Journey dashboard
  • ☐ Sitemap is accessible and up-to-date
  • ☐ Tested on both mobile and desktop

Conclusion

Implementing Journey by Mediavine on a Next.js website requires attention to detail, but the revenue potential makes it worthwhile. By following this guide, you've set up:

  1. Proper script integration that doesn't block page rendering
  2. Optimized sidebar targeting for high-value desktop ads
  3. SEO-friendly configuration that protects your Core Web Vitals
  4. Correct dashboard settings for maximum ad fill rates

Remember: Sidebar sticky ads may take 24-72 hours to appear after initial setup. The "Recommended Content" widget appearing in your sidebar is a positive sign that Journey has correctly identified your sidebar.

About this guide: This guide was created based on real-world implementation experience with Next.js 15 and Journey by Mediavine. Last updated: December 2025.