Hello Savitha, Either approach will work. You might want to take API unit consumption into account; getCampaignStats() consumes 1 unit per campaign per call, while scheduleReportJob() (which is what the reporting methods in APIlity ultimately call) is a flat 500 API units, plus a few more for polling and getting the download URL.
If you want campaign stats via a APIlity-scheduled report, you'd want to use the getCampaignXmlReport() or getCampaignTsvReport() methods. (The getUrlXmlReport() method returns a different report type, other than Campaign-level). My understanding is that those methods take care of scheduling the report, polling for status, and downloading the report, and when the functions do return (which might take several minutes or more) they pass back a PHP string that has all the report content as either XML or in tab-separated values. You can then make use of that data however you'd like. Whatever might be written to disk is probably in a temporary file that you don't need to worry about. You can get more details as to exactly what APIlity is doing under the hood by asking in the APIlity discussion group: http://groups.google.com/group/adwords-api-php Cheers, -Jeff Posnick, AdWords API Team On Jan 13, 8:24 am, "savithacav...@gmail.com" <savithacav...@gmail.com> wrote: > Hello, > > I need clarification and more info regarding this: > > 1. Planning to do cron job for getting clicks, impressions conversions > so on for the all campaigns everyday midnight and store it in the > local database and then retreive data from local db and work on report > format. > > For this please advise me can i do it using > > option a) getCampaignStats : here i will get all the clicks, > impressions so on for every client all campaigns and store it in db > > option b) using getUrlXmlReport: use the xml file and read the data > from the xml file and store it in local database. but i have not done > anything on reports. Where will the XML file be stored , so that i can > read the data. Should i give the URL for saving the data to my local > system. Please advise on how to read the data from the XML file > generated. Do we get all details like clicks, impressions, from the > xml file. > > Please advise me on this . > > I will wait for your reply. > > Thanks > > Savitha --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~----------~----~----~----~------~----~------~--~---