AdWords
2.8K members online now
2.8K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Script to enable & pause campaigns based on Product Availability

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi

 

I have a campaign ( it is not a shopping campaign), and I want to pause and start campaign based on stock availability.  We have another script we run to find stock availability, and currently have someone manually pause the campaigns.  How can we completely automate this.


Regards

Ravi

1 Expert replyverified_user

Re: Script to enable & pause campaigns based on Product Availabili

Top Contributor
# 2
Top Contributor
Hi Ravi
You'll have to use the AdWords API for this as you'll have to interface your script that's checking stock levels with either the AdWords API or another AdWords script. Best bet is to start here: https://developers.google.com/adwords/scripts/docs/features/shopping-campaigns

Unfortunately, it wont be possible to guide you through the steps individually however, if you need assistance, you can always ask over on the AdWords API forum.

Re: Script to enable & pause campaigns based on Product Availabili

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Russ Savage published a script to do exactly what you need:

http://www.freeadwordsscripts.com/2013/10/disable-ads-and-keywords-for-out-of.html

Re: Script to enable & pause campaigns based on Product Availabili

Top Contributor
# 4
Top Contributor
Last time I tried this it was broken. I think Spike Patching, an active member here, posted a solution but I cannot find it anywhere.

Re: Script to enable & pause campaigns based on Product Availabili

Top Contributor
# 5
Top Contributor

Re: Script to enable & pause campaigns based on Product Availabili

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Yes, it broke after the Final URL update. I changed instances of .getDestinationUrl to urls().getFinalUrl and removed the cleanURL function to get it working again.

Re: Script to enable & pause campaigns based on Product Availabili

Top Contributor
# 7
Top Contributor
Ahhh, I didn't realize it was the final URL switch that broke it. Thanks for that Casey!

Re: Script to enable & pause campaigns based on Product Availabili

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Thanks Casey and Dave. I will be trying this script out and will share the findings.