You will need to get your Base URL from Project Agora Commerce before you are able to report impressions and clicks to CitrusAd.
Reporting clicks and impressions can take up to one hour on our staging environment. This is not reflective of production speed and should not be regarded as such.
Project Agora Commerce Javascript Library - Web integrations
The JavaScript Library (formerly the JavaScript SDK) makes it possible to send reports of clicks and impressions to Project Agora Commerce. The Javascript Library adds more tracking information and is advised for web based integrations.
Retailer has to ensure that every click event (Eg. SPL click, SPL add to cart, Banner click) should be connected with the reportClick function.
In addition please ensure that the right clicks and middle-scroll button clicks (as well as left clicks) also should be connected with the reportClick functions
The setup is straightforward. The API currently exposes two methods.
<script type="text/javascript" src="https://assets.citrusad.net/citrusjs/1.2.0/citrus.js"></script>
<script type="text/javascript">
var citrusAd = CitrusAd.init(
'$BASE_URL/v1',
{
disableTracking: false, // Optional: defaults to false.
trackingOptions: {
sessionId: 'YOUR_OWN_TRACKING_TOKEN' // Optional, this token can be used to tie impressions/clicks with a session token that you maintain
}
}
);
citrusAd.reportClick('adId').then(function (result) {
console.log(result);
}).catch(function (error) {
console.log(error);
})
citrusAd.reportImpression('adId').then(function (result) {
console.log(result);
}).catch(function (error) {
console.log(error);
})
</script>