Create Your First Ad

Author
Aron Schatz
Posted
May 23, 2008
Views
20427
Creating your first ad, step by step.

Page 2: Advanced Ads

Advance Adgen

The advanced ad generator can be very intimidating at first. Once you get past how many options there are, it is easy to use if you know CSS. If you don't, stick with the simple generator.

Variables: All variables are javascript variables and have "aseadn" prepended to the var for keeping ASE Adnet's namespace separated from other ad networks. Not all variables are required. After the variables, we will go into creating an ad using the advanced generator.

aseadnuserid
Your userid. This must be in the script for you to get paid! Your userid is 1.

aseadncampaignid
Your selected campaignid. A campaign allows you to track individual ad units.

aseadndefpid
Default product id(s). This is a list (comma separated) of product ids that can be found on the product search pages. This is used if everything else fails for any type of search.

aseadnopennew
Open links in a new window. This value can either be 0 or 1. 0 makes links load in the same window while 1 opens links in a new window.

aseadnrandomize
Randomize keyword/PID. This value can either be 0 or 1. 0 keywords/pids are never randomized (first keyword/pid found will be used). 1 means that each load of an ad unit will pick a different keyword/pid. Only functions when multiple keywords/pids are given.

aseadnstype
Search type. Basically this variable has two values. It can either be 'kw' or 'pid' and it defaults to a keyword search.

aseadnkw
Keyword(s). This is a list of keywords (separated by commas) or a single keyword for use on a keyword search. stype must be set to 'kw' for this to be used (Example: "ati radeon,nvidia geforce,intel core 2").

aseadndefkw
Default keyword(s). This is a list of keywords (separated by commas) or a single keyword for use on a failed keyword search. If no products are found from the kw variable, this will be invoked to show products. stype must be set to 'kw' for this to be used (Example: "ati radeon,nvidia geforce,intel core 2").

aseadnspankw
Span keyword. Used only if variable pc is more than 1. This value can either be 0 or 1. 0 means that a single keyword will only show one product. 1 means that a single keyword will show multiple products (if multiple products can be shown). stype must be set to 'kw' for this to be used.

aseadncategoryid
Category id. This value can be found from the product pages. It is used for keyword searches only. Use 1 for all categories.

aseadnpid
Product id(s). This is a list (comma separated) of product ids that can be found on the product search pages. Including more pids than what pc is set to allows for extra protection against failing queries (this is the internet, things happen). stype must be set to 'pid' for this to be used.

aseadnpc
Product count. This variable ranges from 1-4 and controls the amount of products shown on a single price search.

aseadnmc
Merchant count. This variable ranges from 1-4 and controls the amount of offers per product shown.

aseadntl
Product title length. This variable is an integer that controls the amount of characters to use for a product title. Using 0 for this values disables the length limit.

aseadnsl
Store name length. This variable is an integer that controls the amount of characters to use for a store name. Using 0 for this values disables the length limit.

aseadnshowdesc
Show description. This can either be 0 or 1 (no or yes) and will show a short description of the product. The body changes as a result of using this field.

aseadndl
Product description length. This variable is an integer that controls the amount of characters to use for a product description. Using 0 for this values disables the length limit. This only takes effect if the "showdesc" variable is set to 1.

aseadnshowprodextra
Show extra product fields in ad unit. This can either be 0 or 1 (no or yes). If yes, the ad unit will include the product rating as well as helper text. The body changes as a result of using this field so CSS changes will need to be made.

aseadnshowmercextra
Show extra merchant fields in ad unit. This can either be 0 or 1 (no or yes). If yes, the ad unit will include the merchant rating and merchant logo in addition to the standard result. The body changes as a result of using this field so CSS changes will need to be made.

aseadnimgsize
Product image size. This variable is an integer that controls the size of the product image displayed in an ad unit. Values can be 0, 1, or 2. 0 is a 60x60 image. 1 is a 100x100 image. 2 is a 160x160 image.

aseadnembed
Embed unit. This value controls how the ad unit is displayed. It can either be 0 or 1 (no or yes). If set to 0, the ad unit loads in an IFRAME. If set to 1, it loads directly on a page.

aseadncss
Your CSS file. This is a full URL (including http://) for use with the ad unit. This only takes effect if embed is set to 0.

aseadnadwidth
Width of IFRAME. Integer value used for the IFRAME width. This only takes effect if embed is set to 0.

aseadnadheight
Height of IFRAME. Integer value used for the IFRAME height. This only takes effect if embed is set to 0.

aseadnbodyid
CSS body id of ad unit. This variable sets the body tag id to this variable for use with CSS with multiple ad units. This variable is only used if embed is set to 0.

aseadnnoresulturl
No results URL. If the ad unit is loaded in an IFRAME, this URL will only be shown if no products can be found.

From Scratch

Building an ad from scratch is pretty easy. So let's say you want to have a keyword search for ati graphics cards with a campaignid of 2 in the category of computer things (4). You want to show 2 products and 3 merchants offers for each. We want a default keyword of "amd cpu" to be used in case of a problem. We want to span the keyword to both products. The width of the block will be 600 and the height will be 100. CSS file will be "http://www.ase.cc/xhtml/examplead.css". We are using a medium image (1) and the body id for this ad unit will be "aad_firsthelp". Links should open in a new window. For the example, we are using a userid of 1.

Code

<script type="text/javascript">
<!--
var aseadnuserid=1;
var aseadncampaignid=2;
var aseadnpc=2;
var aseadnmc=5;
var aseadntl=50;
var aseadnsl=25;
var aseadnshowdesc=0;
var aseadndl=0;
var aseadnimgsize=1;
var aseadndefpid='';
var aseadnopennew=1;
var aseadnshowmercextra=0;
var aseadnshowprodextra=0;
var aseadnrandomize=1;
var aseadnembed=0;
var aseadnstype='kw';
var aseadnkw='ati graphics cards';
var aseadndefkw='amd cpu';
var aseadnspankw=1;
var aseadncategoryid=4;
var aseadnadwidth=600;
var aseadnadheight=120;
var aseadncss='http://www.ase.cc/xhtml/examplead.css';
var aseadnbodyid='aad_firsthelp';
var aseadnnoresulturl='';
//-->
</script>
<script src="http://content.ase.cc/js/aseadnshow.js" type="text/javascript"></script>


And that shows this...

sampad1.jpg


The returned body was this:

Code

<body id="aad_firsthelp">
<div class="aadproductrow aadproductrow1">
        <div class="aadpimg"><a href="#"/></a></div>
        <div class="aadptitle"><a href="#">Diamond Multimedia ATI Radeon HD 3870 X2 512 MB PC...</a></div>
                    <div class="aadmercoffer aadmercoffer1"><a href="#">Dell.com</span></a></div>

                        <div class="aadmercoffer aadmercoffer2"><a href="#">Amazon.com</span></a></div>
                        <div class="aadmercoffer aadmercoffer3"><a href="#">CompUSA.com</span></a></div>
                        <div class="aadmercoffer aadmercoffer4"><a href="#">Dell Small Business</span></a></div>

                        <div class="aadmercoffer aadmercoffer5"><a href="#">Dell Small Business</span></a></div>
            </div><div class="aadproductrow aadproductrow2">
        <div class="aadpimg"><a href="#"/></a></div>
        <div class="aadptitle"><a href="#">ATI HD 2600 PRO 512 MB PCI-Express Graphics Card</a></div>
                    <div class="aadmercoffer aadmercoffer1"><a href="#">Dell.com</span></a></div>

                        <div class="aadmercoffer aadmercoffer2"><a href="#">Amazon.com</span></a></div>
                        <div class="aadmercoffer aadmercoffer3"><a href="#">circuitcity.com</span></a></div>
                        <div class="aadmercoffer aadmercoffer4"><a href="#">Dell Small Business</span></a></div>

                        <div class="aadmercoffer aadmercoffer5"><a href="#">CompUSA.com</span></a></div>
            </div><div class="aadpowered">Powered by <a href="http://www.ase.cc/refer.php?userid=1" target="_blank">ASE Adnet</a></div>
<div class="aadend"><!-- Just in case you need a float clearing --></div>
</body>


And the CSS used...

Code

body#aad_firsthelp{font-family: Arial,sans-serif; margin:0; padding:0; border:1px solid #000; color: #000; background:#fff; font-size:12px; text-align:left;}
body#aad_firsthelp *{margin:0; padding:0; border:0;}
body#aad_firsthelp img{margin:0 2px 0 0; float:left; clear:both;}
body#aad_firsthelp a:link,body#aad_firsthelp a:visited{text-decoration: none; color:#33b;}
body#aad_firsthelp a:hover{text-decoration: underline; color:#00e;}
body#aad_firsthelp div.aadptitle{margin: 1px 0; font-size:12px; font-weight:bold; overflow:hidden; height:1.2em;}
body#aad_firsthelp div.aadproductrow{float:left; width:49%;}
body#aad_firsthelp div.aadmercoffer{white-space:nowrap; height:1.1em; margin:1px 0;}
body#aad_firsthelp div.aadmercoffer span.aadmercprice{color:#000; font-weight:bold;}
body#aad_firsthelp div.aadmercoffer span.aadmercstore{color:#000;}
body#aad_firsthelp div.aadpowered{text-align:center;}


Example 2: Description and Extra Merchant Fields

For the second example, we'll be adding the description and the extra fields to produce a larger size single product ad. We want to the ad to be about Seagate hard drives with a campaignid of 2 in the category of computer things (4). The ad itself is large at 600x300. CSS file will be "http://www.ase.cc/xhtml/examplead.css" which is the same file as the previous example. The body CSS id of this unit will be "aseadnet_ex2" and we will use the advanced generator to make it. The options are shown below.

iframe.png


The code generated:

Code

<!-- Generated ASE Adnet Code -->
<script type="text/javascript">
<!--
var aseadnuserid=1;
var aseadncampaignid=2;
var aseadnpc=1;
var aseadnmc=5;
var aseadntl=0;
var aseadnsl=0;
var aseadnshowdesc=1;
var aseadndl=0;
var aseadnshowmercextra=1;
var aseadnimgsize=2;
var aseadndefpid='';
var aseadnopennew=1;
var aseadnrandomize=1;
var aseadnembed=0;
var aseadnstype='kw';
var aseadnkw='seagate hard drive';
var aseadndefkw='';
var aseadnspankw=1;
var aseadncategoryid=4;
var aseadnadwidth=600;
var aseadnadheight=300;
var aseadncss='http://www.ase.cc/xhtml/examplead.css';
var aseadnbodyid='aseadnet_ex2';
var aseadnnoresulturl='';
//-->
</script>
<script src="http://content.ase.cc/js/aseadnshow.js" type="text/javascript"></script>


Produced:

adex2.png


The body:

Code

<body id="aseadnet_ex2">
<div class="aadproductrow aadproductrow1">
        <div class="aadpimg"><a href="#target="_blank" title="Buy the Seagate Barracuda ST3750640AS 750 GB Internal Hard Drive"><img src="http://image.shopzilla.com/resize?sq=160&amp;uid=443926921" alt="Product Image"/></a></div>
        <div class="aadptitle"><a href="#target="_blank" title="Buy the Seagate Barracuda ST3750640AS 750 GB Internal Hard Drive">Seagate Barracuda ST3750640AS 750 GB Internal Hard Drive</a></div>
        <div class="aadpdescription"><a href="#target="_blank" title="Information about the Seagate Barracuda ST3750640AS 750 GB Internal Hard Drive">7200 RPM - Serial ATA 3.0 - 16 MB Cache</a></div>

                    <div class="aadmercoffer aadmercoffer1"><a href="# target="_blank" title="TigerDirect.com"><span class="aadmercprice">$119.99</span> <span class="aadmercfrom">from</span> <span class="aadmercrating">8.9/10</span> <span class="aadmercstore">TigerDirect.com</span> <span class="aadmercimg"><img src="http://img.bizrate.com/merchant/little/23939.gif" alt="TigerDirect.com"/></span></a></div>
                        <div class="aadmercoffer aadmercoffer2"><a href="# target="_blank" title="CompuVest"><span class="aadmercprice">$147.89</span> <span class="aadmercfrom">from</span> <span class="aadmercrating">8.3/10</span> <span class="aadmercstore">CompuVest</span> <span class="aadmercimg"><img src="http://img.bizrate.com/merchant/little/21718.gif" alt="CompuVest"/></span></a></div>

                        <div class="aadmercoffer aadmercoffer3"><a href="# target="_blank" title="PCNation"><span class="aadmercprice">$159.31</span> <span class="aadmercfrom">from</span> <span class="aadmercrating">9.0/10</span> <span class="aadmercstore">PCNation</span> <span class="aadmercimg"><img src="http://img.bizrate.com/merchant/little/31427.gif" alt="PCNation"/></span></a></div>
                        <div class="aadmercoffer aadmercoffer4"><a href="# target="_blank" title="Newegg.com"><span class="aadmercprice">$119.99</span> <span class="aadmercfrom">from</span> <span class="aadmercrating">9.0/10</span> <span class="aadmercstore">Newegg.com</span> <span class="aadmercimg"><img src="http://img.bizrate.com/merchant/little/28697.gif" alt="Newegg.com"/></span></a></div>

                        <div class="aadmercoffer aadmercoffer5"><a href="# target="_blank" title="J&amp;R"><span class="aadmercprice">$159.99</span> <span class="aadmercfrom">from</span> <span class="aadmercrating">8.8/10</span> <span class="aadmercstore">J&amp;R</span> <span class="aadmercimg"><img src="http://img.bizrate.com/merchant/little/17965.gif" alt="J&amp;R"/></span></a></div>
            </div><div class="aadpowered">Powered by <a href="http://www.ase.cc/refer.php?userid=1" target="_blank">ASE Adnet</a></div>
<div class="aadend"><!-- Just in case you need a float clearing --></div>
</body>


The CSS used:

Code

body#aseadnet_ex2{font-family: Arial,sans-serif; margin:3px; padding:0; border:0; color: #000; background:#fff; font-size:16px; text-align:left;}
body#aseadnet_ex2 *{margin:0; padding:0; border:0;}
body#aseadnet_ex2 div.aadpimg img{position:absolute; top: 5.5em; left: 40px;}
body#aseadnet_ex2 a:link,body#aseadnet_ex2 a:visited{text-decoration: none; color:#33b;}
body#aseadnet_ex2 a:hover{text-decoration: underline; color:#00e;}
body#aseadnet_ex2 div.aadptitle{margin: 4px 0; font-size:20px; font-weight:bold; white-space:nowrap; line-height:1.2em; text-align: center;}
body#aseadnet_ex2 div.aadptitle a{color:#000;}
body#aseadnet_ex2 div.aadpdescription{font-size:14px; text-align: center; height:2.6em; line-height:1.2em; overflow:hidden;}
body#aseadnet_ex2 div.aadmercoffer{margin-left:210px; position:relative; height:40px; line-height:40px;}
body#aseadnet_ex2 div.aadmercoffer span.aadmercprice{color:#e00; font-weight:bold;}
body#aseadnet_ex2 div.aadmercoffer span.aadmercimg{position:absolute; top:0; right:95px; width:130px; text-align: center;}
body#aseadnet_ex2 div.aadmercoffer span.aadmercimg img{vertical-align: middle;}
body#aseadnet_ex2 div.aadmercoffer span.aadmercfrom{position:absolute; left: 90px; top:0;}
body#aseadnet_ex2 div.aadmercoffer span.aadmercrating{position:absolute; right: 30px; top:0; color:#000;}
body#aseadnet_ex2 div.aadmercoffer span.aadmercstore{display:none;}
body#aseadnet_ex2 div.aadpowered{display:block; text-align:center; position:absolute; bottom:0; right:0; left:0; margin:0 auto;}


The advanced generator is very powerful if you take the time to use it.
images/siteimages/upload/2009/05/28/1l8a.png campaign.png images/siteimages/upload/2009/05/28/2lsf.png createcampaign.png images/siteimages/upload/2009/05/28/3l5k.png adcode.png images/siteimages/upload/2009/05/28/4lwa.png adgen1.png images/siteimages/upload/2009/05/28/5lek.png adgen2.png images/siteimages/upload/2009/05/28/6lup.png adgen3.png images/siteimages/upload/2009/05/28/7lua.png rescode.png images/siteimages/upload/2008/06/08/9mf8.jpg sampad1.jpg images/siteimages/upload/2008/06/13/10llu.png iframe.png images/siteimages/upload/2008/06/13/11l9p.png adex2.png images/siteimages/upload/2008/06/24/12lpa.png adgen4.png

Title

Medium Image View Large