JSADSERVER™ API
{nodepath}/api/jsadserver/
All General Purposes™ Nodes™ have an internet address.
An example address for an ad server node is
http://www.yoursite.com/gpnodes/adserver_campaigns/holiday_promo/discount_coupon/
Your addresses should be different. It does not matter. All node urls have the api feature available.
If you were to enter this address into a web browser you will see the resulting html output for this node which may be some kind of coupon you created or anything else.
So how do you get the coupon ad to display on another web page while tracking clicks, impressions and the ip addressess of visitors?
This is where the adserver comes in handy.
All General Purposes nodes you create have a built in application program interface or API. One of the API functions is the jsadserver which outputs the html content of the node inside a javascript wrapper. Jsadserver also modifies the links and causes the click through workflow to pass via the jsadserver redirector which logs the visitor data before sending the visitor to the intended destination.
For the above example node your jsadserver api is located at
http://www.yoursite.com/gpnodes/adserver_campaigns/holiday_promo/discount_coupon/api/jsadserver/
In order to display your discount coupon on any website use this html script tag.
<script src="http://www.yoursite.com/gpnodes/adserver_campaigns/holiday_promo/discount_coupon/api/jsadserver/"></script>
If your ad node uses any TerraDctl shortcodes or php script to generate dynamic output or track affiliates then you will need to add a height parameter to the node’s adserver api address.
<script src="http://www.yoursite.com/gpnodes/adserver_campaigns/holiday_promo/discount_coupon/api/jsadserver/?height=400px"></script>
This is because all dynamic ads are served through an iframe which may not be the size that you want by default. To see the raw visitor data use the jsadserver_report api function url.
http://www.yoursite.com/gpnodes/adserver_campaigns/holiday_promo/discount_coupon/api/jsadserver_report/
You may also directly access the impressions and clicks tally accumulators data through the GET api function
{nodepath}/api/get/{dataset_name}/{variable_name}/{api_user}/{api_key}/?format=
** Echo as text,PHPVAR,JSON or XML.