Version 5.0
AdvertServe User Manual :: v5.0

Keyword Targeting - JavaScript Code Integration

Original Code

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


<script src="http://adserver.example.com/js/libcode1_noajax.js" type="text/javascript"></script>

<script type="text/javascript">
if (document.avp_ready) { avp_zone({ base: 'adserver.example.com', type: 'banner', zid: 7, pid: 0 }); }
</script>

Modified Code

What you need to do is add a parameter to this code on your search results page to pass the keywords that were searched for to the ad server.

Lets look at an example of the above code modified to pass the value blue coat,windbreaker,parka to indicate that the phrase blue coat along with the keywords windbreaker and parka were searched for.


<script src="http://adserver.example.com/js/libcode1_noajax.js" type="text/javascript"></script>

<script type="text/javascript">
if (document.avp_ready) { avp_zone({ base: 'adserver.example.com', type: 'banner', zid: 7, pid: 0, keywords: 'blue coat,windbreaker,parka' }); }
</script>

Tip Tip