Web Page Coding
Custom targeting allows you to pass data to the ad server to be targeted and reported on.
While the possibilities of what you can do with the custom targeting are endless, here are just a couple of example usage scenarios:
- If visitors need to register and log in to your web site, chances are that you’ve collected some information about them. For example, you might have collected information about their interests and hobbies such as music or fishing. It would be possible to pass that information to the ad server and deliver campaigns related to music or fishing to those visitors.
- Your web site organizes resources into categories, each with their own dedicated web page. It would be possible to pass the name of the category to the ad server, allowing you to effectively target campaigns to individual categories. That would greatly reduce the number of zones you would require to do category targeting because you would only need one zone for each of your ad spots and they could be used across all of your category pages. In fact, that might even be required by your setup if your category pages all share the same page template.
Then continue on below with the instructions for type of code that you generated for the zone.
Once you have your code working and passing data to the ad server, read on to find out how you can customize the names of your fields in the user interface, integrate your data values into drop down combo boxes in the user interface with XML data feeds, enable custom field data logging and reporting, and learn how to enter custom targets for your campaigns.
You probably don’t want your fields to appear as Custom Field #1 through Custom Field #10 in the user interface and statistics reports? No problem! Simply go to Settings > Basic > Custom Fields in the control panel and enter a descriptive name in Field Names input box for each desired custom field.
Pay attention, however, that the parameter names inserted into the zone code will always be named custom1 through custom10 as your descriptive names are only displayed in the user interface and statistics reports.
In most cases, you will probably have a list of preset data values that you would like to target your campaigns to. You may pass such a list into the user interface so that you can select data values to target instead of having to type them in. To do this, go to Settings > Basic > Custom Fields in the control panel and enter the URL of an XML feed into the Field Values input box for the desired custom field.
Your XML feed may be static or dynamically generated, but it must adhere to the following syntax.
<?xml version="1.0"?> <dataset> <entry name="One" value="1" /> <entry name="Two" value="2" /> <entry name="Three" value="3" /> </dataset>
There is no limit to the number of data field entries, however, you may experience performance issues if your feed contains more than a few hundred or thousand entries.
With all of the integration in place, you can proceed to target campaign to the data values you’re passing to the ad server.
Let’s assume that you are passing a numeric value of 12345 using Custom Field #1 as an example.
- Edit your campaign and scroll down to and expand the Custom Targeting panel.
- Select the matching operator for the field. We will use simple EQUALS in this case since we’re working with numeric data. Many other operators like GREATER THAN and even REGULAR EXPRESSION are available to let perform some really complicated matching logic though. Further help with using the various operators is available in the context help above each custom field.
- Enter the value 12345 in the box for the field values or select it from your preset list if you set up an XML data feed. What if you wanted to target multiple values? You would simply enter one value per line in the box and then only one of the values in the set would need to match for the campaign to be targeted.
Once your targets have been entered, you should now see that your campaign only appears when the targeted data values are passed to the ad server.
Logging and reporting of custom field values passed to the ad server is not enabled by default.
Before enabling it, you should consider a few things:
- Do you really need to see reports on these values? Perhaps another system you have already provides them?
- How many unique data values will you be passing to the ad server? The ad server performs a lot of data grouping operations, such as per-campaign or per-zone reports by day. Having tens of thousands of unique data values can lead to the size of your database tables growing out of control!
To enable the logging and reporting, go to Settings > Expert > Statistics and check the box for all of the custom fields you want to generate reports for.