Version 5.0
AdvertServe User Manual :: v5.0

Custom Targeting - JSP Code Integration

Original Code

You should now have a generated JSP zone code from the code wizard that looks like the following:


<advertpro:banner host="adserver.example.com" port="80" path="/" zone="123" publisher="0" width="468" height="60" hspace="0" vspace="0" border="0" alt="Click Here!" target="_blank">
</advertpro:banner>

Modified Code

What you need to do is add extra parameters for each of your custom fields. When one of your web pages is served, you'll need to output the data into the values of those parameters. Where that data actually comes from is of no concern to the ad server, so you're free to use any datasource you have available for use such as but not limited to a cookie, flat file, database record, or a user session object.

Lets look at an example of the above code modified to pass the value 12345 using Custom Field #1 for the custom field.


<advertpro:banner host="adserver.example.com" port="80" path="/" zone="123" publisher="0" width="468" height="60" hspace="0" vspace="0" border="0" alt="Click Here!" target="_blank">
  <advertpro:custom field="1" value="12345"/>
</advertpro:banner>

Passing multiple values can be done by delimiting them with commas: 123,456,789 requiring only one in the set to yield a match.

Warning Warning

Parameter values will be URL encoded automatically, so you should not manually encode them.

Note Note

Even if you have renamed your custom fields by going to Settings > Basic > Custom Fields, the parameter names inserted into the zone code must always be named 1 through 10 as your customized field names are only displayed in the user interface and statistics reports.