Weather Script - Removing Bid Modifiers

208 views
Skip to first unread message

Amanda Cornell

unread,
May 9, 2019, 1:02:29 PM5/9/19
to Google Ads Scripts Forum
Hello, 

I've created a weather script to make bid adjustments based on the following criteria:
Condition NameTemperature (in Fahrenheit)Precipitation (in mm of rain in last 3 hrs)Wind (in mph)
Sunny60 to 85below 0below 10
Rainyabove 0
Windyabove 20

When these weather conditions are not met, I want bid modifiers to clear which I know you use -1.0 as a bid modifier on the Campaign tab to achieve this. Does that mean I have to create inverse weather conditions to what I have specified above? For example, the 'Rainy' weather condition, I'd add another weather condition with the precipitation to be 'below 0' and assign the -1.0 bid modifier in the Campaign tab to all campaigns I have 'Rainy' applied to? If that's the case, how would you suggest I make the inverse of the condition 'Sunny' since I use a range of temperatures?

Also, if I'm targeting at the state level within the US, does the script take an average of the weather for the entire state to determine if the bid modifier should be applied?

Thank you!

googleadsscrip...@google.com

unread,
May 9, 2019, 3:56:16 PM5/9/19
to Amanda Cornell via Google Ads Scripts Forum, Google Ads Scripts Forum
Hi Amanda,

The default bid modifier is '1'. The bids are only changed during the period in which the special weather conditions are met. If the specified weather condition is not met, the bids will not be modified.

The Open Weather Map API will not take the average temperature of a state. If you plug in a state in the API, it will return the weather for a specific geo-coordinate in that state. For example, this is what is returned for querying 'Massachusetts, US'. The specific geo-coordinates are provided on that page.

Regards,
Matt
Google Ads Scripts Team

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/d95ff246-72d9-4055-ad54-f1b9a25c938c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amanda Cornell

unread,
May 9, 2019, 4:32:27 PM5/9/19
to Google Ads Scripts Forum on behalf of googleadsscripts-forumadvisor

Hi Matt,

 

I understand the bids only change if the specific weather conditions are met. My question is if the bid modifiers were applied when the weather conditions were met but then the script runs again but the weather is NOT met, how do I remove the existing bid modifiers using -1 in the campaign tab? Do I need to make additional weather conditions that are the opposite of the weather conditions that I attached in my initial post?

 

Amanda Cornell | Digital River, Inc. | Marketing Analyst, Paid Media Programs

d: +1.952.225.3765 | acor...@digitalriver.com | www.digitalriver.com

10380 Bren Road West, Minnetonka, MN 55343 | United States

 

From: Google Ads Scripts Forum on behalf of googleadsscripts-forumadvisor <adwords...@googlegroups.com>
Sent: Thursday, May 9, 2019 2:56 PM
To: Amanda Cornell via Google Ads Scripts Forum <adwords-scripts+apn2wqfdcwv1z-_x...@googlegroups.com>
Cc: Google Ads Scripts Forum <adwords...@googlegroups.com>
Subject: RE: Weather Script - Removing Bid Modifiers

 

 
### This email originated from outside of the organization. ###

To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.

--

-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---

You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/8QWzvEy71As/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/ijlio2ot60000000o09u3m0041l3u4x74mjgdpl6go30c1g68r34e1k%40mail.gmail.com.

googleadsscrip...@google.com

unread,
May 10, 2019, 12:14:26 PM5/10/19
to Google Ads Scripts Forum
Hello,

To clarify, in the scenario you described:

if the bid modifiers were applied when the weather conditions were met but then the script runs again but the weather is NOT met, how do I remove the existing bid modifiers

You won't need to remove the bid modifiers, since every time the script runs, the bid modifier is reset to '1' for each campaign/location. It has to set that bid modifier again and will only do so if the weather condition is met again. I would recommend looking into the function, 'applyRulesForCampaign', in the script to see exactly how this works.

Regards,
Matt
Google Ads Scripts Team

On 05/09/19 16:32:19 adwords...@googlegroups.com wrote:

Hi Matt,

 

I understand the bids only change if the specific weather conditions are met. My question is if the bid modifiers were applied when the weather conditions were met but then the script runs again but the weather is NOT met, how do I remove the existing bid modifiers using -1 in the campaign tab? Do I need to make additional weather conditions that are the opposite of the weather conditions that I attached in my initial post?

 

Amanda Cornell | Digital River, Inc. | Marketing Analyst, Paid Media Programs

To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scripts+unsubscribe@googlegroups.com.

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/8QWzvEy71As/unsubscribe.

To unsubscribe from this group and all its topics, send an email to adwords-scripts+unsubscribe@googlegroups.com.

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/DM5PR0801MB378184AEA568A291559E1190A1330%40DM5PR0801MB3781.namprd08.prod.outlook.com.
Message has been deleted

Amanda Cornell

unread,
Jun 12, 2019, 4:42:02 PM6/12/19
to Google Ads Scripts Forum
My script currently isn't making any changes to the campaigns in my script even though some weather condition should be met.

I want to make sure it's not because of the location settings. I have the 'Apply Modifier To' set to 'All Geo Targets'. In my Google Ads account, I have the locations broken out at the state level. Therefore, in the Geo targeting mapping tab I have Weather Location column all set to 'United States' and the Geo target codes for all US states listed as shown below (not all shown):
Weather LocationGeo Target Code
United States21132
United States21133
United States21135
United States21136
United States21137
United States21138
United States21139
United States21141

Is this set up correctly so that I don't have to list out ever state in the 'Campaigns' tab even though I want the script to make changes to all 50 US states when the weather meets the criteria I have set?

Google Ads Scripts Forum Advisor Prod

unread,
Jun 12, 2019, 5:31:55 PM6/12/19
to adwords-scripts+apn2wqfdcwv1z-_x...@googlegroups.com, adwords...@googlegroups.com
Hi Amanda,

The column with the header 'Weather Location' is what is location interpreted by the OpenWeather API, and the 'Geo Target Code' column are the geocodes understood by Google Ads. 

This would not explain why you are not getting any results, however. Can you please privately provide your CID and script name?

Thanks,
Matt 
Google Ads Scripts Team

ref:_00D1U1174p._5001UBmywp:ref
Message has been deleted

Google Ads Scripts Forum Advisor Prod

unread,
Jun 13, 2019, 3:27:20 PM6/13/19
to adwords...@googlegroups.com, adwords-scripts+apn2wqfdcwv1z-_x...@googlegroups.com
Hi Amanda,

The script is fine, but the spreadsheet has two issues. 
  1. The spreadsheet has weather condition, 'Sunny', which has the precipitation defined as 'below 0' (in column C), which is not a possible condition. 
  2. The only place the API is taking the weather from, is wherever 'United States' is interpreted as. So, the script is only using the weather from one location. Since, the API cannot take the weather of an area the size of the United States, it will choose a much smaller area in the US. 
As a test, I created a copy and changed the 'Sunny' condition so that it would be met, no matter the weather, and the script executed without issue and made changes to the campaigns in your spreadsheet. Changing the two items above should take care of the issue.

Regards,

Amanda Cornell

unread,
Jun 13, 2019, 4:25:15 PM6/13/19
to Google Ads Scripts Forum on behalf of adsscriptsforumadvisor

Thank you so much for the help! Just to clarify, the best way to target all 50 US states would be to list out all 50 states in the ‘Campaigns’ tab for each campaign and each weather condition?

 

cid:image001.png@01D51A29.D1FB8240

cid:image002.png@01D51A29.D1FB8240

Amanda Cornell

Marketing Analyst, Paid Media

o: +1.952.225.3742

acor...@digitalriver.com

 

 

 

 

 

From: Google Ads Scripts Forum on behalf of adsscriptsforumadvisor <adwords...@googlegroups.com>
Sent: Thursday, June 13, 2019 2:27 PM
To: adwords...@googlegroups.com
Cc: adwords-scripts+apn2wqfdcwv1z-_x...@googlegroups.com
Subject: RE: Weather Script - Removing Bid Modifiers

 

 
### This email originated from outside of the organization. ###

Hi Amanda,

Google Ads Scripts Teamhttp://google-dev-relations.my.salesforce.com/servlet/servlet.ImageServer?oid=00D1U000001174p&esid=0181U000000WqH0

ref:_00D1U1174p._5001UBmywp:ref

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/8QWzvEy71As/unsubscribe.

Google Ads Scripts Forum Advisor Prod

unread,
Jun 14, 2019, 3:58:30 PM6/14/19
to adwords...@googlegroups.com
Hi Amanda,

Targeting the entire United States based on the weather of one location is probably not ideal. If you have all 50 states as individually targeted locations in each of your campaigns, then the method you described below would work. Also, please keep in mind that the 'All geo targets' setting will change the bidding of all targeted locations in a campaign based on the weather of a single location.

Regards,
Matt 
Google Ads Scripts Team

ref:_00D1U1174p._5001UBmywp:ref
Reply all
Reply to author
Forward
0 new messages