Jump to content

Remaining Impressions For Advertisers


Tony

Recommended Posts

Hi Tony,

Advertisers -> Campaigns -> Campaign Properties ->Pricing

You can set Impressions or Unlimited

 

If you have set custom value instead of unlimited you can view Remaining Impressions

 

 

Example :

 

Impressions      1000            Impressions Remaining:1,000

 

 

Code for  Remaining Impressions of a particular campaign

 

    // Get the campagin data from the data_intermediate_ad table, and store in $campaign

    if (($campaign['impressions'] > 0) || ($campaign['clicks'] > 0) || ($campaign['conversions'] > 0)) {
        $dalData_intermediate_ad = OA_Dal::factoryDAL ( 'data_intermediate_ad' );
        $record = $dalData_intermediate_ad->getDeliveredByCampaign ( $campaignid );
        $data = $record->toArray ();

$campaign['impressionsRemaining'] = $campaign['impressions'] - $data ['impressions_delivered'];

If you have set custom impressions instead of unlimited , you can use

$campaign['impressionsRemaining']

to display remaining impressions

Link to comment
Share on other sites

Hi, Chinnu G. 

That works only if you work under a manager account. If you logged in as an advertiser, you can't get such info. When an advertiser clicks on a campaign link, he get banner list instead of a campaign properties. 

 

So my advertisers request for such a feature. 

Link to comment
Share on other sites

Hi Tony ,

 

You can customize    advertiser-campaigns.php & campaign-index-list.html  use following code to calculate Remaining Impressions

    // Get the campagin data from the data_intermediate_ad table, and store in $campaign
    if (($campaign['impressions'] > 0) || ($campaign['clicks'] > 0) || ($campaign['conversions'] > 0)) {
        $dalData_intermediate_ad = OA_Dal::factoryDAL ( 'data_intermediate_ad' );
        $record = $dalData_intermediate_ad->getDeliveredByCampaign ( $campaignid );
        $data = $record->toArray (); 

$campaign['impressionsRemaining'] = $campaign['impressions'] - $data ['impressions_delivered'];
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...