Jump to content

How can I access campaign revenue value?


Recommended Posts

When I request a banner via the rest api, https://{my host}/www/delivery/fc.php?script=bannerTypeHtml:vastInlineBannerTypeHtml:vastJson&format=json&zones=' + {zone id}, it returns quite a bit of useful information, including campaign id, but excluding the campaign revenue value. 
Is there some other endpoint I can use to get this information?

Link to comment
Share on other sites

I poked around a bit, and decided to write one specific to this particular need

 

<?php

$host = '';
$usr = '';
$pwd = '';
$db = '';
$crArray = array();
$mysqli = new mysqli($host,$usr,$pwd,$db,3306);
if(!$mysqli->connect_error) {
        $result = $mysqli->query("select campaignid,coalesce(revenue,0) as revenue from rv_campaigns");
        $mysqli->close();
        while($row = $result->fetch_assoc()) {
                $crArray[] = $row;
        }
}
header("Content-Type: application/json");
echo json_encode($crArray);
exit();
?>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...