Openx Track/Log Clicks Customization
Openx is an ad server 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 clicks/ log clicks by country, region and city. Openx is tracking clicks in ‘data_bkt_c’ table and transfer it to another table ‘data_summary_ad_hourly’ after every one hour. This are the total clicks for particular campaign or zone.
Now if you want to track clicks for particular country or region or city then you need to make some changes and need to create another table for country as well. Using these extra table and tracking/logging clicks, you are able to show reporting or some well analyze clicks 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 clicks tracking. If you want to track country wise impressions and country wise requests also than click here. OpenX Track/Log Impressions Customization and Openx Track/Log Requests Customization
1) Create table for country wise clicks tracking.
For e.g. ‘data_bkt_country_c’ (structure is same as data_bkt_c)
– add extra fields whatever you need to track by. like Country code, Region, City, IPaddress etc.
2) Open logClick.delivery.php file. (Path: Openx\plugins\deliveryLog\oxLogClick)
– This is the file where Openx is tracking clicks. 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_c’).
3) Now you are done with tracking clicks by country, region or city. Openx is transferring data from ‘data_bkt_c’ table to ‘data_summary_ad_hourly’ with impressions and requests along with clicks.
Let me know if you find any problem.