Cookbook
Mr. Pickles the AdPlugg Pug

Placing an Ad on a Sitecore Site Using the AdPlugg Snippet

This recipe shows you how to place an ad on a Sitecore site using AdPlugg. This recipe just adds a single ad but you can use it to add any number of ads by combining it with other recipes, etc. The recipe uses the AdPlugg Snippet, which will work on any site, but the instructions in this recipe are specific to a Sitecore site.

Create An Ad

First, we need to create an AdPlugg Ad.

  1. From within your AdPlugg account, create an Ad and upload an ad image (see the Ad Help Page).

Add the AdPlugg JavaScript SDK to Your Sitecore Site

Next we are going to add the AdPlugg JavaScript SDK to your Sitecore Site. This allows you to place and run AdPlugg ads on your Site.

  1. Log into the Sitecore admin and go to the Content Editor.
  2. In the content tree panel on the left, go to sitecore/Layout/Layouts.
  3. Edit the “Main Layout”.
  4. From within your account at adplugg.com, click "Download" and then "Snippet".
  5. Click the "Get The Snippet" button (at the bottom).
  6. Copy the AdPlugg SDK and paste it into the Main Layout right after the opening <head> tag.
  7. Publish your changes.
  8. Repeat the above for any other Layouts as necessary.

Add an AdPlugg Ad Tag

Now we are going to add an AdPlugg Ad Tag to your Sitecore page using a Sitecore Rich Text Field.

  1. From in the Sitecore admin, go to the Experience Editor.
  2. Add a Rich Text Field to wherever your want the ad to appear.
  3. In the Rich Text Field editor, switch to HTML mode by clicking the HTML tab at the bottom.
  4. From your AdPlugg dashboard, go to Download and then Snippet. Click the "Get the Snippet" button (at the bottom) and then copy the Ad Tag to your clipboard.
  5. Paste the Ad Tag code that you copied above in to the HTML box in Sitecore.
  6. Save the field and publish.

Adding More Ads!

You can insert ads into other areas of your Sitecore Site using the same technique that we used above.

You can also use AdPlugg Zones to serve different (or the same) ads into these various areas.

Check out the other recipes in the AdPlugg Cookbook for more cool things that you can do with the ads on your Sitecore site including scheduling, page targeting, rotation and more.