Getting campaigns that have been running for x hours

15 views
Skip to first unread message

Samir Sabri

unread,
Apr 19, 2021, 9:12:28 AM4/19/21
to AdWords API and Google Ads API Forum
Hello

For a specific customer account, we can get a listing of all campaigns, however, how can we get a listing of running campaigns that have been running for x hours? is that possible?

Thanks,

Google Ads API Forum Advisor Prod

unread,
Apr 19, 2021, 2:19:08 PM4/19/21
to as3...@gmail.com, adwor...@googlegroups.com
Hello,

You can run the campaign report and select the field hour to see if your campaigns were running and had impressions for that hour.

Regards,
Anthony

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q2FZgM7:ref
Message has been deleted

Samir Sabri

unread,
Apr 20, 2021, 6:07:30 AM4/20/21
to AdWords API and Google Ads API Forum
Thanks Anthony, but I did not meat to investigate on a certain hour, but I needed to know which campaign that has been active for certain amount of hours. For example, I want to know which campaigns that have been running for 8 hours or more so far.

We have custom logic that calculates the campaign revenue, and we need to determine if a campaign laster certain amount of hours, before we calculate if its losing or winning.

Google Ads API Forum Advisor Prod

unread,
Apr 20, 2021, 9:14:38 AM4/20/21
to as3...@gmail.com, adwor...@googlegroups.com
Hi Samir,

Unfortunately, there is no method in the API to determine how many hours a campaign has been running. You may be able to use the hour field and use some logic to calculate this depending on if the campaigns had impressions for consecutive hours. 
Reply all
Reply to author
Forward
0 new messages