Implementing the Yavli plugin part is very simple. You need to accomplish three things:
Create a script that can download the code from our API server. You will need to know your credentials: WebsiteID and ApiKey. Please request these from us if you have not already received them.
Replace [WebsiteID] and [ApiKey] with your given credentials in the following URL:
http://api.yavli.com/v2/get-ad-server?X-WebsiteID=[WebsiteID]&X-ApiKey=[ApiKey]&raw=1
Now create a script that loads this URL, and stores the results somewhere locally (eg. in a database).
Note: Please do not trigger your download script above directly in your website, that will make your website re-download the JS from our API on every load.
Place the download-script you create above into cron, and execute it once per hour.
Add the JS code which the script above downloads into your website. Please place it right above, or close to, your closing body tag:
<!-- Place the JS code here --> </body>
You can download a sample PHP implementation of this plugin by clicking here.