Tony Posted December 11, 2013 Report Share Posted December 11, 2013 A possibility to display remaining impressions for advertisers accounts. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2013 Report Share Posted December 11, 2013 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 Quote Link to comment Share on other sites More sharing options...
Tony Posted December 11, 2013 Author Report Share Posted December 11, 2013 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2013 Report Share Posted December 11, 2013 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']; Quote Link to comment Share on other sites More sharing options...
Tony Posted December 12, 2013 Author Report Share Posted December 12, 2013 Could you please send it as a patch at github? I don't feel myself sure enough to edit the source. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 12, 2013 Report Share Posted December 12, 2013 I will let you know Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.