Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Should I write my own monitoring script and use Adwords API to pause the campaigns if my server is down, or there is a simple way to do it?

I don't want to use 3rd party software, because the task looks rather simple for that.

share|improve this question
Personally the best method would be to avoid having your server go down, use better hosting or change the way you update / maintain the server. –  bybe Feb 3 '13 at 14:53
Well, that sounds pretty reasonable. But you know, you never know when you may experience disk failure, or power outage. And this happens even with the most reliable hosting providers. –  C-Blu Feb 3 '13 at 15:48
Answer Incoming. –  bybe Feb 3 '13 at 17:49

2 Answers 2

up vote 5 down vote accepted

Return of Investment

I don't believe that using an Adwords API to adapt to downtime on your hosting is the way forward. Instead you should be adjusting your Adword budget and budgeting for reliable hosting, that in some ways is fail proof. A server with greater uptime can be a better return of an investment than a adwords since well you could lose a sale.. Never mind being changed by Google for not even receiving the traffic.

You raised concerns about hardware fail in your comments which I'll now address.

Cloud Hosting

Hosting in this day and age is extremely safe and hardware fails do not happen on services that you pay for. With good VPS hosting on a Cloud such as provided from Rackspace you don't get hard drive fails or power issues since your files are hosted on fail proof raids and redundant power supplies. When a node or hard drive fails your files are shifted to new nodes since your instance is hosted on multiple servers while not relying on one server. So it is my honest opinion if you are concerned about downtime then simply your hosting is not good and you should consider using a almost fail proof system.

Good DNS Hosting

DNS can also go down but again there is many DNS providers that provide better up times and fail proof systems that ensure that your website is always online. For max up-time you want DNS that has DNSSEC and Active Fail-over, Again things like this pretty much remove the downtime possibility.

But this isn't what I asked

Please note I know that I haven't addressed your question with a way of using the API but it will be useful to tell you that I've worked with many clients with adword campaigns and I have never come across the issue with clients being concerned about being charged during down time, Clients never fact in downtime because DOWNTIME Is not an option for them and since your paying for traffic I'd also consider it being vital that making downtime non optional buy interments better practices to ensure that downtime does not happen.

share|improve this answer

It should be possible to do, but would take some implementation. You would need:

  1. A monitoring service that knows when your site is down
  2. The ability to trigger a program to run when the monitoring service detects that your site is down
  3. Access to the Google Adwords API
  4. A program that would use the API to list your campaigns and loop through them and pause all of them.

Here is a question on the Google product forums asking for a simple code to use the Adwords API to pause an account. There is a link that points to some example code that could be adapted:

This code example demonstrates updating a campaign's Budget using VB DotNet: http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/examples/adwords/vb/v201109/BasicOperations/UpdateCampaign.vb You could adapt this code example to update the Campaign's status to paused: https://developers.google.com/adwords/api/docs/reference/latest/CampaignService.Campaign#status

share|improve this answer

protected by John Conde Aug 1 '14 at 19:55

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.