Welcome Guest. Sign in or Signup

1 Answers

Custom Targeting Zone Code: Hardcoded or truly variable?

Asked by: 673 views API / Integration

1 Could you please help me understand zone code for custom targeting?

For example:

* Is the zone code hardcoded for each constant possible for custom field #1, or
* Is the zone code truly a variable that just passes the ID from the page served to AdvertServe?

Reference this page:
http://demo.renegadeinternet.com/advertpro/docs/html/manual/integration.html#custom

2 What confuses me is:

* From the referenced manual page “example of the above code modified…” the zone code custom1 variable is hard coded to recognize when the variable is equal to the constant 12345.

But the ‘Custom Targeting’ section writeup explains a variable implementation, for example:

* “It would be possible to pass that information to the ad server and deliver campaigns related to music or golfing to those users.”
* “to pass the name of the category to the ad server”
* “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.”

3 Or perhaps the way AdvertServe implements custom targeting is I need to know in advance the defined set of categories: so if we have 24 categories the zone code can pass any one of the 24 categories but they have to be hardcoded/predefined in the zone code as:

&custom1=1,2,3,…22, 23,24

4 We would like to implement the zone code without the hard coding which results with, for example:

A The ‘&custom1’ variable without a constant would be included in the zone code.
B Custom targeting is added to a campaign as defined here:
http://forums.renegadeinternet.com/showthread.php?t=922
C The media is delivered to the page when the parameter in the campaign ‘Data’ field matches the parameter of the web page served.

5 The reason this is our preferred implementation is:

For the custom1 variable for example we may add 25 to 100 IDs per month:

* Month 1 = 1 to 25
* Month 2 added 26 to 50 resulting in 1 to 50 cumulative
* Month 3 added 51 to 100 resulting in 1 to 100 cumulative
* Etc

Our AdvertServe tech will know IDs 1 to 100 were added in months 1 – 3 and can easily include any one of them in the campaign data field.

The problem is if we have to update the zone code hardcoding each month to include the IDs added that month, this effort is significant. Plus there is a time lag between when each category is added and when the zone code is updated.

1 Answers



  1. renegade_mike on Mar 15, 2010

    The examples in our manual are only examples. They are intended to show the syntax for the custom parameters.

    Lets assume that you are using PHP for all of the pages on your web site. In your pages you have a variable named $zipcode which contains the zip code of the visitor. Where you get the zip code from is not important. It might come from a user inputting it on your site, you might pull it out of a registration database if users log in to your site, or you could even have something like GeoIP to guess their zip code from the IP address.

    What you would then add to the zone code is the following PHP code to output the variable:

    &custom1=< ?php echo urlencode($zipcode) ?>

    So, every time your page is rendered the zip code output by PHP is going to change depending on the value of your $zipcode variable.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes