Openx Track/Log Impressions Customization
Openx is an ad sever platform who provide you ad serving solution to power all of your digital advertising. I am working with mobile advertising platform application and i have used Openx-2.8 for ad delivery. Now my client needs some customization for tracking impressions/ log impressions by country, region and city. Openx is tracking impressions in ‘data_bkt_m’ table and transfer it to another table ‘data_summary_ad_hourly’ after every one hour. This are the total impressions for particular campaign or zone.
Now if you want to track impressions for particular country or region or city than you need to make some changes and need to create another table for country as well. Using these extra table and tracking/logging impressions, you are able to show reporting or some well analyze impressions statistics which is very very useful for advertiser as well as publisher (Site User).
Below are the steps you need to follow to show Openx Country wise Reporting/ Openx Country wise impressions tracking. If you want to track country wise requests and country wise clicks also than click here. Openx Track/Log Requests Customization and Openx Track/Log Clicks Customization
1) Create table for country wise impression tracking.
For e.g. ‘data_bkt_country_m’ (structure is same as data_bkt_m)
– add extra fields whatever you need to track by. like Country code, Region, City, IPaddress etc.
2) Open logImpression.delivery.php file. (Path: Openx\plugins\deliveryLog\oxLogImpression)
– This is the file where Openx is tracking impressions. So you have datetime, creative_id(campaignid) and zone_id. You can write your logic here for getting country and other related data. Add all data in new table which we have created earlier (‘data_bkt_country_m’).
3) Now you are done with tracking impressions by country, region or city. Openx is transferring data from ‘data_bkt_m’ table to ‘data_summary_ad_hourly’ with requests and clicks along with impressions.
Let me know if you find any problem.