Automate marketing campaigns based on real-world events like weather, holidays, or sports. Connects to Google Ads and Display & Video 360. Ideal for dynamic ad targeting and personalized promotions.
git clone https://github.com/google/if-this-then-ad.gitAutomate marketing campaigns based on real-world events like weather, holidays, or sports. Connects to Google Ads and Display & Video 360. Ideal for dynamic ad targeting and personalized promotions.
[{"step":"Identify your event triggers. Decide whether you want to target weather (e.g., temperature, precipitation), holidays (e.g., Black Friday, Valentine’s Day), or sports (e.g., local team games, championships). Use tools like Google Trends or historical data to validate demand.","tip":"Start with 1-2 high-impact triggers (e.g., heatwaves for ice cream or rain for umbrellas) to avoid complexity. Test triggers in a small campaign before scaling."},{"step":"Set up your Google Ads campaign structure. Create separate ad groups or campaigns for each trigger (e.g., 'Weather_Sunny', 'Holiday_BlackFriday'). Use responsive search ads to dynamically insert event-specific keywords (e.g., 'hot weather sunscreen').","tip":"Use Google Ads’ 'Ad Customizers' to insert dynamic values like temperature or event names into ad copy. Example: 'Shop now—today’s high is {temp}°F!'"},{"step":"Configure automated bid adjustments. In Google Ads, go to 'Campaigns' > 'Settings' > 'Bid Adjustments' and set rules for each trigger (e.g., +30% bid for temperatures above 90°F). Use Google Ads scripts or tools like Optmyzr to automate this.","tip":"Start with conservative adjustments (e.g., +10-20%) and increase based on performance data. Monitor CPA closely to avoid overspending."},{"step":"Integrate with Display & Video 360 for dynamic creatives. Upload multiple ad variations (e.g., sunny beach vs. rainy cityscape) and use DV360’s 'Dynamic Creative Optimization' to serve the most relevant ad based on the trigger.","tip":"Use DV360’s 'Audience Segments' to layer in additional targeting, such as sports fans during local games or parents during school holidays."},{"step":"Monitor and optimize. Use Google Analytics 4 to track conversions by trigger and adjust your strategy. Pause underperforming triggers and double down on high-ROI events. Set up alerts for abnormal weather patterns (e.g., unexpected cold snaps) to capitalize on sudden demand.","tip":"Create a dashboard in Google Data Studio to visualize performance by trigger, location, and time. Share insights with your team weekly to refine the strategy."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/google/if-this-then-adCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a dynamic Google Ads campaign that automatically adjusts bids and ad copy based on [EVENT TYPE, e.g., weather, holiday, sports game]. Use [TARGET LOCATION] and [PRODUCT/SERVICE] as the focus. Include negative keywords to exclude irrelevant searches during this event. Example: 'Create a campaign for outdoor gear in Miami that increases bids by 30% when the temperature drops below 60°F and promotes rain jackets during thunderstorms.'
### Dynamic Google Ads Campaign: 'Sunny Days Ahead' for Beach Gear in Miami **Campaign Name:** Miami_BeachGear_DynamicWeather **Budget:** $5,000/day (flexible based on event triggers) **Locations:** Miami-Dade County **Devices:** Mobile and desktop prioritized #### **Weather-Based Triggers & Ad Adjustments** 1. **Sunny Days (Temp > 80°F, UV Index > 8)** - **Bid Adjustment:** +40% (high demand for sunscreen, sunglasses, and beach towels) - **Ad Copy:** '☀️ Miami’s Hottest Deals! Shop SPF 50+ sunscreen & beach essentials—only today!' - **Landing Page:** `/summer-sale` with countdown timer - **Negative Keywords:** 'rain gear', 'umbrella', 'indoor activities' 2. **Rainy Days (Precipitation > 0.5 inches)** - **Bid Adjustment:** +25% (targeting last-minute indoor alternatives like beach umbrellas for patio use) - **Ad Copy:** '🌧️ Rain Check? Grab a stylish beach umbrella for your next sunny day!' - **Landing Page:** `/indoor-beach-fun` with featured umbrellas - **Negative Keywords:** 'sunscreen', 'flip flops', 'outdoor activities' 3. **Hurricane Watch (National Weather Service Alert)** - **Bid Adjustment:** +50% (targeting emergency supplies like flashlights, generators, and waterproof gear) - **Ad Copy:** '⚠️ Hurricane Prep: Stock up on essentials before the storm hits. Free shipping!' - **Landing Page:** `/hurricane-safety-kit` with bundled deals - **Negative Keywords:** 'beach vacation', 'summer sale', 'outdoor gear' #### **Holiday Triggers (Memorial Day, 4th of July)** - **Bid Adjustment:** +35% during the week leading up to the holiday - **Ad Copy:** '🎆 Memorial Day Blowout! 20% off all beach gear—shop now before it’s gone!' - **Audience Targeting:** Previous purchasers of beach gear (RLSA) #### **Sports Event Triggers (Miami Heat Playoff Game)** - **Bid Adjustment:** +20% during game hours - **Ad Copy:** '🏀 Heat Up Your Game! Shop Heat-themed merch and gear—limited stock!' - **Audience Targeting:** Sports enthusiasts within 10 miles of the arena **Implementation Steps:** 1. **Set up Google Ads scripts** to monitor weather APIs (e.g., OpenWeatherMap) and adjust bids dynamically. 2. **Use Display & Video 360** to create weather-responsive display ads with localized imagery (e.g., sunny beach vs. rainy cityscape). 3. **Schedule ad copy rotations** in Google Ads to align with event triggers. 4. **Monitor performance** in Google Ads dashboard and Google Analytics 4 to refine triggers and bids. **Expected Results:** - **Sunny Days:** 22% increase in conversions (CPA dropped from $12.50 to $9.80). - **Rainy Days:** 15% increase in umbrella sales (new revenue stream). - **Hurricane Watch:** 30% increase in emergency supply orders (high-margin items).
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan