Using an HTML sprocket for additional Ad Unit (GAM only)


Good news for anyone that wanted to try and put more ad slots (Google calls them ad units) on their site! You can try this method where you manually ad your ad unit in DfP and use this snippet of Javascript in your HTML sprocket.

If you are using the new GPT tags, you can follow these instructions to create HTML sprockets for ads.

Part 1 - Create your Ad in DfP

  1. Log into your account and go to Inventory

  2. Click "New Ad Unit" for Web

  3. Give it a name following the preferred naming convention

    1. Prefix with site short name like "MMP_" or "VAL_" (you can look yours up in Metro Publisher Settings)

    2. Append with ad dimensions like "_300x250" or "_728x90"

    3. Keep this name handy!

  4. Select your size (recommend 300x250 or 300x600)

  5. Don't bother with Placements, just go ahead and save

  6. Insert artwork by placing an order

  7. Look up your Property Code in Network Settings (click the Admin tab) and keep it handy, too (includes "ca-pub-")

Part 2a - Create an HTML sprocket to display the ad

  1. Log into your Metro Publisher worksite as an Editor and go to Sprockets
  2. Add a new HTML sprocket and give it a name that helps you know what it is

  3. In the HTML Content area, click "Source" and paste in the following two bits of Javascript and replacing the filler with the Property Code and Ad Unit information.

    <script type="text/javascript">
    GA_googleAddSlot("Insert_Property_Code_Here", "Insert_Ad_Unit_Name_Here");

    <script type="text/javascript">GA_googleFillSlot("Insert_Ad_Unit_Name_Here");
  4. Save and try inserting your new sprocket into a section/subsection or homepage.
If you are using the new GPT tags, you can follow these instructions to create HTML sprockets for ads.
*You sometimes have to wait about 30 minutes before new ads start delivering in DfP


Have more questions? Submit a request


  • Avatar
    Taylor Pilkington

    This is great -- thanks!

Powered by Zendesk