Help with monitoring budget spend for more accounts

81 views
Skip to first unread message

Kamil Aujesky

unread,
May 13, 2015, 5:31:39 AM5/13/15
to adwords...@googlegroups.com
Hi there,

please im new to AdWords scripts but i found one script what really solves my problem but it doesnt work. 

Can you help me anyone please update this script ?


I want to export data from more accounts to spreadsheet where i will define total budget. After running script i want to know what budget was spent on separate campaigns for date range: Start campaign date - yesterday

Is it possible?

Thanks.

Anthony Madrigal

unread,
May 13, 2015, 10:05:01 AM5/13/15
to adwords...@googlegroups.com
Hi Kamil,

Could you please let me know what error you are getting when you try to run the script? 

The AdWords Scripts page has a code snippet of how to get campaign budgets which may help you.

Regards.
Anthony
AdWords Scripts Team

Kamil Aujesky

unread,
May 18, 2015, 5:09:51 AM5/18/15
to adwords...@googlegroups.com
Hi there, 

error is about Bad url to Spreadsheet.. I tried to put url with http, without, only characters in url: 1p77ag9OQB5vkF9t84u87--46Jqz7Q-xTAqMuTxWfeHE but nothing works.

URL is definitely right.

Can you help me with this please?

thanks

Dňa streda, 13. mája 2015 16:05:01 UTC+2 Anthony Madrigal napísal(-a):

Anthony Madrigal

unread,
May 18, 2015, 9:28:45 AM5/18/15
to adwords...@googlegroups.com
Hello,

I will take a look at your script and see what I can do. Could you please Reply privately to author your CID and the name of your script?

Thanks,
Anthony
AdWords Scripts Team

Anthony Madrigal

unread,
May 19, 2015, 11:40:22 AM5/19/15
to adwords...@googlegroups.com
Hello Kamil,

The code you are using is a bit outdated. That is why the line getSpreadsheet(SURL); was failing. It should be changed to SpreadsheetApp.openByUrl(SURL);. 

However, after changing your code, I noticed that the block of code where you "Loop through every date of the campaign and retrieve the total spent at that date" was inefficient since it may run too many operations, which may cause failures.

I suggest a simpler way to do this by running a spreadsheet report and using a Campaign Performance Report.

Hope this helps!

Cheers,
Anthony
AdWords Scripts Team
Reply all
Reply to author
Forward
0 new messages