upturnstudio / module-google-feed
Google Merchant Center product feeds with configurable attribute mapping, ad-click capture on orders, and a REST API for spend-vs-sales attribution.
Package info
github.com/brideo/module-google-feed
Type:magento2-module
pkg:composer/upturnstudio/module-google-feed
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- ext-xmlwriter: *
- magento/framework: *
- magento/framework-message-queue: *
- magento/module-backend: *
- magento/module-catalog: *
- magento/module-config: *
- magento/module-configurable-product: *
- magento/module-cron: *
- magento/module-eav: *
- magento/module-graph-ql: *
- magento/module-inventory-sales-api: *
- magento/module-quote: *
- magento/module-sales: *
- magento/module-store: *
- magento/module-tax: *
- magento/module-ui: *
- magento/module-webapi: *
- upturnstudio/module-mcp: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Google Merchant Center product feeds for Magento 2, plus the order data needed to compare Google Ads spend with real sales per product.
What it does
| Product feeds | Build XML feeds for Merchant Center. Choose which products go in and map each Google attribute to a product attribute, fixed text, a template or a built-in value such as price or availability. |
| Ad click capture | When a shopper arrives from a Google ad, the click ID is remembered and recorded on the order they place. |
| AI connector tools | An AI client, or the reporting service, can read and manage feeds, mapping, Google-specific values (category, GTIN, custom labels, better titles) and orders through the store's MCP connector, one tool per action. Edit tools are off until an admin allows them. |
| REST API | Google attribute values and click-attributed orders for systems that prefer REST, and a cart click call for headless storefronts. |
The module does not connect to Google Ads itself. A separate reporting system fetches spend and clicks per product from Google Ads and joins them to this module's order data by SKU. That system is not part of this module.
Requirements
- Magento 2 or Mage-OS (tested on Mage-OS 3.5.0 with PHP 8.4)
- Inventory Management (MSI) enabled
- Magento cron running
Install
composer require upturnstudio/module-google-feed bin/magento module:enable UpturnStudio_GoogleFeed bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flush
Quick start
-
Go to Marketing > SEO & Search > Google Feeds and click Add Feed.
-
Name it, pick the store view, and save. The attribute mapping is pre-filled.
-
Click Generate Now, or run:
bin/magento upturnstudio:google-feed:generate
-
Copy the Feed URL from the grid into Merchant Center as a scheduled fetch.
User guides
| Guide | Covers |
|---|---|
| Getting started | Install, first feed, connecting Merchant Center |
| Creating a feed | Feed settings and choosing which products to include |
| Attribute mapping | Mapping Google attributes, templates, variants, Google categories |
| Generating feeds | Schedules, Generate Now, the command line, run status |
| Google attribute values per product | Values pushed through the API and where to see them |
| Ad click tracking | How clicks are captured and tied to orders |
| AI connector | Letting an AI client or the reporting service manage feeds, and the edit switch |
| Subscription and API access | The optional subscription key and REST access |
| Troubleshooting | Common problems and how to fix them |
For developers of the reporting system: the AI connector tools reference and the REST API reference.
Good to know
- Configurable products are listed as their variants, grouped by the parent SKU.
- A feed file is replaced only when the new one is complete, so Merchant Center never fetches half a feed.
- Everything in this module works without a subscription key. The key is optional and connects the store to the reporting service, which adds content improvement suggestions and Google Ads spend vs ROI tracking.
- The key is not yet verified against a service; that check is still to be connected.
- There is no screen for mapping store categories to Google's category list. See Attribute mapping for the options.
Permissions
Under System > Permissions > User Roles (and on Integrations, for the REST routes):
| Resource | Grants |
|---|---|
| Google Feeds > Manage Feeds | The feed grid and form in the admin |
| Google Feeds > API and AI Connector > Read Feeds, Options and Item Previews | AI connector read tools for feeds |
| ... > Create, Change and Delete Feeds; Run Generation | AI connector tools that edit feeds |
| ... > Read and Write Google Attribute Values | Attribute value tools and REST routes |
| ... > Read Click-Attributed Orders | Orders tool and REST route |
| ... > Read and Change Settings | Settings tools |
| Stores > Configuration > Google Feeds Section | The settings page |
Extending
- More Google attributes: add items to the
attributesargument ofUpturnStudio\GoogleFeed\Model\Feed\GoogleAttributePoolin yourdi.xml. - More built-in value sources: implement
UpturnStudio\GoogleFeed\Model\Feed\Resolver\ResolverInterfaceand add it to theresolversargument of...\Resolver\ResolverPool. - More AI connector tools: implement
UpturnStudio\Mcp\Api\ToolInterface(extendUpturnStudio\GoogleFeed\Model\Mcp\AbstractToolto get the permission check and the edit switch) and register it onUpturnStudio\Mcp\Model\Mcp\ToolRegistry. - A different subscription check: replace the preference for
UpturnStudio\GoogleFeed\Api\LicenceValidatorInterface.
Tests
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/UpturnStudio/GoogleFeed/Test/Unit
Licence
MIT. See LICENSE.
