reset password Signup

Tutorial: How to Install Your Ad Code

After you create an ad zone, the next thing you will need to do is install the ad code so that any ads that you sell can start appearing on your website.

1. Login to your account and go to Publishers » Dashboard by hovering your email address in the top-right corner. Then click on the "Actions" button for your zone and select Ad Code from the drop-down menu.

2. On this page, you will see the snippets of code that you will need to paste into your website as well as the settings for your zone. For this step, you will copy the STEP 1 Main Code and paste it into your site just below the opening <body> tag of your website. If you are using a Wordpress theme, the opening <body> tag may be included in a file within your theme's files called header.php or something similar.

It is very important that the STEP 1 Main Code is in the proper place in your website and that it appears only once on each page. If the STEP 1 Main Code is not at all present in your site or if it is duplicated in a page, your ads will either not appear at all or will not display properly. You can think of this as the 'engine' that drives your ads. Without this code, your ads will not work.

Below is a screenshot of where the STEP 1 Main Code is placed in a sample site. It is also important to paste the code directly below your opening <body> tag with nothing in between.

3. Next you will paste the STEP 2 Zone Code wherever you want that zone to appear in your website. For example, if you want this ad zone to appear in your sidebar, then you will find the file in your website that contains your sidebar code and paste the code where you want the ad zone to appear. If you are using a Wordpress theme, this file may be an include file within your theme's files called sidebar.php or something similar to that. Or if you want your ad zone to appear in your header, then you may need to open a file called header.php or something similar. It is important that you install this code as soon as you can. Your zone will not be available for sale on your public ad page until a few hours after your ad code is installed properly and tracking impressions.

Below is a screenshot of where the STEP 2 Zone Code is placed in a sample site. You will want to paste this code exactly where you want your ads to show up in your site.

If you are not familiar with your website's files, you may need your web designer to help you install the code. Or if you are using Wordpress, you can try using our Official Wordpress Plugin. We usually prefer that you install our code manually to avoid issues with the plugin in themes that are not programmed accurately, but it is a good option to try if you feel more comfortable installing the code this way.

4. Next you will scroll down the to the "Display settings" area. Here you will make decisions about how your ads will appear within your zone.

  • Show Ad Here - When you check this box, you are turning on the option to show placeholder "Advertise Here" banners that will link to your Ad Detail page so potential advertisers visiting your site can find out about your available ad spaces. It is usually best to keep this option on since that is how many potential advertisers will find out about your available ad space.
  • Repeat Ad Here - When you check this box, you are turning on the option to show the "Advertise Here" banner for all of the available ads in that zone. So if you have 4 banners in this zone and you check this box, you will see 4 "Advertise Here" banners where those ads have not been sold yet. As ads are sold, those will be replaced by the real ads. By default and without this checked, only 1 "Advertise Here" banner will show in your zone at a time as long as you have at least 1 ad available to purchase. So in this case, if you have 1 banner sold, and this box is not checked, you would see the real banner for the ad that was sold and just 1 "Advertise Here" banner instead of 3 "Advertise Here" banners.
  • No Styles - Checking this will remove all pre-defined styles from your ad zone, so if you remove this, you will want to be sure that you ad styles to your own stylesheet for the ads to appear properly on your site.
  • Vertical - By default, our system floats ads to the left using CSS. This is the default setting because this is the way that many ads are displayed by our publishers. But in some cases, a publisher does not want an ad to float to the left - primarily if the ads in that zone are in a vertical column or if there is just 1 ad in a zone. It is always best to check this box for an ad zone that contains only 1 ad or that has 1 column of ads displayed vertically. When this setting is turned on, the system removes the 'float:left;' style and your ad(s) should display properly.

5. The "Style Settings" section allows you to edit the CSS for this ad zone if you wish to edit the margins of your ads, etc. You should only edit this area if you are familiar with editing CSS. If you are not familiar with editing CSS, it may be best to have your web professional edit these settings or send a request to our Support Department outlining what it is that you wish to edit so that we can assist you.

  • Anchor Style - Editing this field will apply styles to the anchor tag for each ad in this zone. So if you are editing the margins between your ads, you will want to edit that here.
  • Image Style - Editing this field will apply styles to just the image of your ad. In most cases, you will leave the CSS in this field the way it is and just apply your CSS to the "Anchor Style" field above.
  • Ad Here Style - Editing this field will apply styles to the "Advertise Here" banner that appears within this zone. So if you want this to be a different color than the gray box, you would change that color by editing "background:#e7e7e7" and changing "#e7e7e7" to the color of your choice.
  • Ad Here Hover Style - Editing this field will apply styles to the hover state of the "Advertise Here" banner in this zone. So if you want the "Advertise Here" banner to be a different color during the hover state, you would change that color by editing "background:#ddd" and changing "#ddd" to the color of your choice.

I hope this helps as you go through the process of installing your ad code. Please be sure to submit a Support Ticket if you need help at anytime during this process. We are always happy to help. :)



Additional Articles

Browse all help questions for:

Open a Ticket

We tend to answer most support tickets during normal business hours: Monday to Friday, 9:00 am to 6:00 pm (EST). However, we're constantly monitoring tickets, and we'll address urgent issues on nights and weekends, too.

Open a Ticket
Does BuySellAds look broken? Disable your ad blocker, their haphazard default filters sometimes break our site.