Weather-based Campaign Management Unable To Pull Precipitation

20 views
Skip to first unread message

Matt Pospisil

unread,
Jul 9, 2019, 6:24:05 PM7/9/19
to Google Ads Scripts Forum
From my understanding the Weather-based Campaign Management script still mostly works however some essential features do not. The script can no longer pull precipitation from the OpenWeather API. This has been talked about before on this thread; however, the recommended fix has incomplete information. They suggest to pull the weather ID instead of precipitation from the OpenWeather API. I do not have a tremendous amount of experience in scripting so if anyone has an example of the fix or recommended lines to change that would be extremely helpful.

Thanks.

Google Ads Scripts Forum Advisor Prod

unread,
Jul 10, 2019, 3:59:37 AM7/10/19
to adwords...@googlegroups.com

Hi Matt,

Have you tried the solution that Christian provided in the said thread and encountering issues? If yes, so I can further investigate the issue, could you provide the following information via Reply privately to author?

  • CID
  • script name
  • access to the spreadsheet

Regards,
Hiroyuki
Google Ads Scripts Team



ref:_00D1U1174p._5001UCbvx2:ref

Google Ads Scripts Forum Advisor Prod

unread,
Jul 11, 2019, 1:45:17 AM7/11/19
to adwords...@googlegroups.com

Hi Matt,

Thank you for providing your CID, script name and access to the spreadsheet privately.

You may modify lines below to achieve your use case without using precipitation.

Line 161:
// Wind speed (e.g. above 5)
'id': weatherConditionData[i][3]

Line 274 - 276:
var id = weather.weather[0].id;
return evaluateMatchRules(weatherRules.temperature, temperature) &&
   evaluateMatchRules(weatherRules.id, id);

I would suggest that you Preview the script to see the possible changes first.

Please let me know how it goes after trying the suggestion.

Reply all
Reply to author
Forward
0 new messages