User guide

AI Ads Advisor for Magento 2: User Guide

Your Google Ads history kept in Magento for good, wasted spend and missed searches found every night with your own prices and margins, and AI proposals for keywords, negatives, bids, budgets and ad texts that you approve before anything changes in Google Ads.

  • Version 2.2.2
  • Magento 2.4.7 to 2.4.9
  • PHP 8.2 to 8.5
  • Hyvä and Luma

AI Ads Advisor connects Magento to your Google Ads account and keeps the account's daily history in your own database. It shows what every campaign, keyword, search term and ad costs and earns, finds wasted spend and missed searches every night, and lets AI propose concrete changes: negative keywords, new keywords, pausing keywords, budget and bid changes within your limits, new ad texts, device bid adjustments and complete new ad groups for products worth advertising. Nothing changes in Google Ads until an admin approves it. Every applied set of changes is a process with an ID and a date (for example ADS-20261101-001), checked by Google first and revertible, and the module measures afterwards what it did.

1. Requirements

MagentoOpen Source or Adobe Commerce 2.4.7 to 2.4.9
PHP8.2 to 8.5
ThemesAny (the module works only in the admin)
Othercommercegears/module-core, commercegears/module-ai-core 2.4+ and commercegears/module-ai-advisor-core 1.4+ (installed automatically); Magento cron running
GoogleA Google Ads account and a Google Cloud project with the Google Ads API enabled
AI (optional)Your own Anthropic (Claude) or OpenAI (GPT) API key in AI Core, for AI proposals, ad texts, AI reviews, learnings and Analyse Now

2. Installation

With Composer. Use the Composer keys from your account on commercegears.com (see https://commercegears.com/composer-access/):

composer config repositories.commercegears composer https://repo.commercegears.com
composer config --auth http-basic.repo.commercegears.com PUBLIC_KEY PRIVATE_KEY
composer require commercegears/module-ai-advisor-ads
bin/magento setup:upgrade
bin/magento setup:di:compile            # production mode only
bin/magento setup:static-content:deploy # production mode only
bin/magento cache:flush

The module appears under CommerceGears > AI Ads Advisor; its settings are in Stores > Configuration > CommerceGears > AI > AI Ads Advisor.

3. Connect Google Ads

  1. In Google Cloud (console.cloud.google.com) use a project with the Google Ads API enabled and create an OAuth client ID of type Desktop app (APIs & Services > Credentials). The OAuth consent screen can stay in "Testing" with your Google user added as a test user; refresh tokens of apps in testing expire after 7 days, so publish the app (internal use is enough) for tokens that last.
  2. Enter the Customer ID of the Ads account (and the manager account ID if you sign in through one), the client ID and secret, and press Save Config.
  3. Press Generate Refresh Token. A Google window opens: sign in with a user that can manage the Ads account and allow access. Google then sends the browser to an address starting with http://127.0.0.1/?state=, which does not load: copy that address into the box and press Use This Code. The refresh token is stored encrypted. You can also paste a refresh token you created elsewhere.
  4. Developer token: usually not needed (Google accepts requests from Cloud projects with Google Ads API access without one). If Test Connection reports a developer-token error, enter your token from Google Ads > Tools > API Center.
  5. Press Test Connection (read only: it lists the reachable accounts and campaigns) and set Enabled = Yes.

Cron then loads the history (default 24 months, one month per run) and fetches the last 14 days again every 6 hours, so late conversions are counted.

Search Console and GA4 (optional). When AI SEO Advisor is installed and has data, its Search Console and GA4 data is used automatically. Otherwise the module fetches them itself through the read-only Google connection shared by all AI Advisors (Stores > Configuration > CommerceGears > AI Advisors: Shared Settings). They add the Organic + Paid page, keyword ideas from Search Console and landing-page numbers from GA4.

4. The screens

  • Dashboard: cost, conversions, cost per conversion, ROAS, clicks and wasted spend in one chart with a comparison period. Flags mark processes (A), changes made in Google Ads or another tool (C), notes (N) and, with AI SEO Advisor, SEO changes (S). Below: where the money goes, the most wasteful search terms, opportunities, the latest processes, changes made elsewhere and what we've learned.
  • Campaigns and campaign detail: status, budget, bidding, impression share and what was lost to budget or rank, with top keywords, search terms, devices, hours and countries.
  • Keywords, Search Terms and Ads: grids with filters such as "wasted: cost, no conversion", "no match with your keyword rule", "converting" and "not a keyword yet", and bulk actions Propose as Negative Keywords, Propose as Keywords and Propose Pausing. Ads are shown as search-result previews with their results.
  • Product Value: per product the price, margin, sales, stock, page conversion rate and search potential, and what a sale is worth. Products without a cost price are valued by their sales value and labelled so.
  • Opportunities: found every night (no AI needed), one card per search term, keyword, campaign, ad group or device with the reasons, the numbers, the proposal and a forecast, ranked by expected profit.
  • Processes and Changes: every process (ADS-), recorded change from Google Ads (ACHG-) and note (NOTE-) with its status and measured result, and the Google Ads API call log.
  • What We've Learned: what your measured changes taught, per kind of change, with evidence; keep or ignore each.
  • Rules: one card per rule with an on/off switch (section 6).
  • Analyse Now: the AI reads the figures the module has worked out and lists the findings most worth your time. It shows its cost range first and starts only after you confirm. Findings can become tasks or settings changes you review; nothing is applied by Analyse Now itself.

5. Processes: propose, review, apply, revert

  1. Start a process from an opportunity (Draft Changes), from a selection in a grid, or with New Ads Process, where the AI drafts proposals for up to 5 campaigns.
  2. Each proposal is a review card: now and proposed, why, the expected effect, the rule check and a "can increase spend" flag. Accept, Edit (keyword text and match type, amount, bid adjustment, ad texts; the rules are checked again) or Reject it.
  3. Apply Accepted Changes. The rules are checked again, the current values are read from Google (a budget, bid or status changed in Google Ads since the proposal is not touched), Google checks the changes first, and then they are sent in one request. Changes that can raise spend need a second confirmation.
  4. Revert a process or a single change at any time; Google checks the undo first as well.

Impact. After a settle period (default 3 days) the module compares the days before the change (default 14) with the same number of days after, for the changed campaigns next to the rest of the account, and gives a plain verdict: better, worse, no clear change, too little data or still measuring.

Tasks. Some proposals are things you do outside Google Ads, such as fixing conversion tracking. They come with steps and Mark as Done, and are measured like a change.

6. Rules and limits

  • Keyword words: every keyword must contain one of your words; search terms without them are flagged and proposed as negatives.
  • Match types allowed for new keywords.
  • Budget steps: at most N% at a time and M% per week.
  • Maximum cost per click.
  • Don't touch these campaigns and keep paused things paused.
  • Spend limits: all campaigns together at most X a day and Y a month, optionally per campaign.
  • Exploration campaign: a campaign with its own small budget where new wordings are tested first.

A proposal that breaks a rule is not offered, unless it is proposed as an exception for one keyword or one campaign with its reason; an exception needs its own approval and ends after 30 days (setting). Hard limits are never overridden: spend limits, campaigns not to touch, the exploration campaign's budget, the hard maximum cost per click and the largest daily rise of all budgets (Settings > Safety).

7. Settings

Stores > Configuration > CommerceGears > AI > AI Ads Advisor: connection, safety (daily cap on changes, API log retention, hard maximum cost per click, largest daily budget rise, days a rule exception lasts), data (history to load, days fetched again, minimum wasted spend, clicks before a keyword is judged, impact window, settle period, cooling-off, target cost per conversion), AI (model per task, weekly review, maximum size of one AI request), new ads (show the price) and keyword ideas (own informational and commercial words).

Shared with the other AI Advisors in AI Advisors: Shared Settings: the Google connection for Search Console and GA4, the store profile, What Should Count When Ranking? (incl. Not Sold Online When and Enquiry Value) and the instructions for the AI.

8. Command line, cron and permissions

bin/magento commercegears:ads:status           # connection, stored days, backfill progress, last fetches
bin/magento commercegears:ads:fetch            # state, last days, change history now
bin/magento commercegears:ads:backfill         # load the history now
bin/magento commercegears:ads:opportunities    # the nightly jobs now
bin/magento commercegears:ads:product-value    # rebuild the product value model

Cron: fetch every 6 hours, backfill every 10 minutes while months are missing, nightly impact and opportunities, and a weekly AI review and learnings on Mondays.

Permissions under CommerceGears > AI Ads Advisor: View Google Ads Data; Create Drafts and Annotations; Approve, Apply and Revert Changes in Google Ads; AI Drafting, AI Review and Learnings; Manage Rules; Settings (also the API call log).

9. Limitations

  • One Google Ads account per Magento installation.
  • Search campaigns get every proposal; Performance Max, Shopping, Display and video campaigns show their totals only.
  • Forecasts are rules of thumb with their assumptions stated, not Google's own forecasts.
  • Impact verdicts are based on daily averages and cannot rule out other causes; small accounts often show "too little data".
  • Not included: structured snippets, image assets, location bid adjustments, shared negative lists and feed checks for Shopping or Performance Max.

This guide is for version 2.2.2 and also comes with the module, in docs/user-guide.md. All user guides