Loading ...


Contextual advertising


C|ON|TEXT Home Page >  Publishers  >  Implementation

How to show ads only on certain parts of the page?

If you're implementing in-text ads, you will probably want to avoid having text on certain parts of page change into links and ads. For example, you probably wouldn't like this o happen in a menu you have on the page. Also, you may have parts of page that are initially hidden and are shown only using script when initiated by user action. That's probably not the best spot for an in-text ads, because the visitor will not see the ads unless he activates that part of the page.

To limit in-text ads showing only to a certain parts of the page you need to change HTML code so that selected parts are enclosed in a DIV tag having a ctx_content class. It's not really necessary to have this class defined within page's CSS classes, this class name is only a reference C|ON|TEXT looks for on your page to separate designated parts of the page to show in-text ads on.

The following example shows how a simple page with parts showing the ads and parts not showing the ads should look like:

<HTML> <HEAD> <TITLE>Sample page</TITLE> </HEAD> <BODY> <P>This text will not be modified to contain ads</P> <DIV class="ctx_content">This text WILL BE MODIFIED to contain ads</DIV> <DIV>This text will not be modified to contain ads</DIV> </BODY> </HTML>

In HTML code above you can see which part of text will be used to show in-text ads. The rest of the page will not be used. You can have multiple separate sections to show ads on. In that case you need enclose different section of the page inside a specified DIV tag. If there are no sections enclosed in specified tag on the page, the system will use entire page to display ads.




Related articles

What are in-text ads?
What are banner ads?
What are channels?
How do I help C|ON|TEXT recognize which parts of the page contain relevant content?


Search