AdSense Revenue Sharing for Multi-Author WordPress Sites

Previous topic - Next topic
QuoteDo not look for a "Revenue Splitting" plugin; most are obsolete. The industry standard in 2026 is Ad Slot Allocation. You must rotate ad units so Author A's ads appear on Author A's posts (100% impression share). Use the Advanced Ads plugin or a custom PHP script.

Most site owners misunderstand "Revenue Share." You cannot tell Google to "send 50% of the money from this click to Author A." Google pays one account per ad unit.

To split revenue, you must split the Impressions.

Scenario A: On Author A's post, 100% of ads belong to Author A.

Scenario B: On Author A's post, the Sidebar Ad is yours (Admin), and the In-Content Ad is Author A's.

This is fully legal under Google's policies, provided every author has a verified AdSense account.

Checklist

  • Approved Accounts: Your authors must already have their own fully approved AdSense accounts. You cannot "sub-license" your account to them.
  • Site Verification: Your domain must be added to the "Sites" tab in every author's AdSense dashboard.
  • User Field: You need a method to store their `data-ad-client` (Pub ID) and `data-ad-slot` in their user profile.
  • The Hidden Requirement: The ads.txt Matrix. Your site's `ads.txt` file must contain a separate line for every author. If Author A's Pub-ID is missing from your `ads.txt`, their earnings will be zero.

Step-by-Step Guide (The Code Method)

This method uses a simple PHP function to swap the Publisher ID dynamically.

  • Step 1: Add Custom Fields

    Add this to your theme's `functions.php`. It creates fields in the User Profile for authors to save their AdSense IDs.

    add_action( 'show_user_profile', 'shiva_adsense_field' );
    add_action( 'edit_user_profile', 'shiva_adsense_field' );

    function shiva_adsense_field( $user ) { ?>
    <h3>AdSense Settings</h3>
    <table class="form-table">
    <tr>
    <th><label for="pub_id">Publisher ID (e.g., ca-pub-123...)</label></th>
    <td><input type="text" name="pub_id" id="pub_id" value="<?php echo esc_attrget_the_author_meta'pub_id'$user->ID ) ); ?>" class="regular-text" /></td>
    </tr>
    <tr>
    <th><label for="slot_id">Ad Slot ID</label></th>
    <td><input type="text" name="slot_id" id="slot_id" value="<?php echo esc_attrget_the_author_meta'slot_id'$user->ID ) ); ?>" class="regular-text" /></td>
    </tr>
    </table>

    <?php }

    add_action'personal_options_update''shiva_save_adsense_field' );
    add_action'edit_user_profile_update''shiva_save_adsense_field' );

    function 
    shiva_save_adsense_field$user_id ) {
    if ( !
    current_user_can'edit_user'$user_id ) ) return false;
    update_user_meta$user_id'pub_id'$_POST['pub_id'] );
    update_user_meta$user_id'slot_id'$_POST['slot_id'] );
    }
  • Step 2: Create the Shortcode

    This code checks who wrote the post and serves their ad.

    add_shortcode( 'dynamic_ad', 'shiva_display_dynamic_ad' );

    function shiva_display_dynamic_ad() {
    $author_id = get_the_author_meta('ID');
    $pub_id = get_the_author_meta( 'pub_id', $author_id );
    $slot_id = get_the_author_meta( 'slot_id', $author_id );

    ```
    // Fallback to Admin ID if Author is empty
    if ( empty($pub_id) ) {
        $pub_id = &#39;ca-pub-ADMIN_ID_HERE&#39;;
        $slot_id = &#39;ADMIN_SLOT_ID&#39;;
    }

    return &#39;&lt;script async src=&quot;[https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=](https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=)&#39;. $pub_id .&#39;&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
    &lt;ins class=&quot;adsbygoogle&quot;
         style=&quot;display:block&quot;
         data-ad-client=&quot;&#39;. $pub_id .&#39;&quot;
         data-ad-slot=&quot;&#39;. $slot_id .&#39;&quot;
         data-ad-format=&quot;auto&quot;
         data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
    &lt;script&gt;
         (adsbygoogle = window.adsbygoogle || []).push({});
    &lt;/script&gt;&#39;;

    ```

    }
  • Step 3: Implementation

    Insert the shortcode `[dynamic_ad]` into your Single Post template via a Widget or Block Hook.

Method B: The Plugin Method (No Code)

Use the Advanced Ads plugin.

  • Step 1: Create an Ad Unit for Author A.
  • Step 2: Set "Display Conditions" to Post Author is Author A.
  • Step 3: Repeat for all authors. This is cleaner for small teams but harder to scale than the code method.

How It Works & Hidden Details

The CPM Shift (2025 Update):

Since Google AdSense moved primarily to impression-based payments (CPM) in late 2024, this method is now more accurate than before. Previously, you needed a click to earn. Now, just loading the author's ad unit generates revenue for them.

The 50/50 Logic:

If you want to take a 50% cut, you must modify the code to use a random number generator (`rand(1,100)`). If the number is >50, show Author Ad; otherwise, show Admin Ad.

Things to Watch Out For

  • Risk 1: Invalid Traffic. If an author clicks their own ads to boost earnings, their account will be banned. However, because the ads are on your domain, Google may also flag your domain as "High Risk." You share the penalty.
  • Risk 2: Auto Ads Conflict. You cannot use Google Auto Ads (the AI injection) for this. Auto Ads are global and difficult to split by author. You must use "Manual Ad Units."

Frequently Asked Questions

  • Q: Can I use this for YouTube embeds?
    A: No. YouTube revenue stays with the channel owner. This guide applies only to banner ads.
  • Q: Is this taxed?
    A: Google handles the tax for each author individually since they are paid directly into their own bank accounts.

Check your ads.txt file immediately; it is the most common point of failure.

Update: Additional Details & Recent Changes

  • The "Site Verification" Friction (Critical 2025-26 Change):
    Previously, authors could just paste their ad code and it would work. As of late 2025, AdSense enforces strict Site Verification.
    The new hurdle: Author A *must* add your domain (`example.com`) to the "Sites" tab in their AdSense dashboard.
    The catch: If your `ads.txt` does not already contain Author A's Publisher ID, AdSense will reject their attempt to add the site, often showing a "Unable to verify" error.
    Fix: You (Admin) must update the `ads.txt` file *first*. Then, tell Author A to wait 24-48 hours before adding the site to their dashboard.
  • MCM (Multiple Customer Management) vs. Code Swapping:
    Google is pushing "Platforms" toward the MCM (Multiple Customer Management) program within Google Ad Manager. If you are a large publisher (millions of views), code swapping (the method in the article) is now considered "Gray Hat." You should technically sign up for MCM "Manage Inventory" (MI) to formally sub-license your inventory to authors. However, for standard blogs, the manual code method remains functional but strictly monitored for invalid traffic.
  • Auto Ads Incompatibility:
    Do not attempt to use "Auto Ads" for revenue sharing. Auto Ads are injected into the `<head>` and apply to the whole page load. You cannot split Auto Ads so that "Top Vignette goes to Admin" and "Bottom Anchor goes to Author." You must disable Auto Ads on multi-author posts and strictly use Manual Ad Units (Blocks/Widgets) to control the revenue flow.
  • Privacy Policy Compliance (GDPR/CPRA):
    Since you are allowing third parties (your authors) to collect data on your visitors, your Privacy Policy (CMP) must legally list every single author's AdSense entity as a "Data Processor" or "Partner." Failure to do this can lead to TCF v2.2 errors and zero revenue in the EU/California.

QuoteStep 2: Create a Shortcode for the Ad...
Update: The AdSense JS library (`adsbygoogle.js`) has updated its loading behavior. It is now more efficient to load the script once in the footer globally with your (Admin) ID, and then only swap the `data-ad-client` (Pub ID) in the following tags:

<ins>
Loading the external script multiple times (once for every author block) harms Core Web Vitals (INP/LCP).

Similar topics (4)