feat: Google Shopping Ads - #60
Conversation
📝 WalkthroughWalkthroughAdds a new Google Commerce Manager docs page, updates site navigation and redirects, and generalizes ecommerce event documentation across Android, Flutter, iOS, and React Native SDK docs to reference both Meta and Google integrations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
ecommerce-manager/google-commerce-manager.mdx (2)
96-99: Clarifycontent_idsas Merchant Centerid(offer_id) to avoid mapping mistakes.Line 98 currently says “ID or SKU,” but the doc also requires exact Merchant Center product ID matching (Line 72, Line 75). Tightening this wording prevents implementers from sending a non-matching catalog key.
✏️ Suggested wording update
-| `content_ids` | array | `view_item`, `add_to_cart`, `ecommerce_purchase` | Product IDs — must exactly match the **ID or SKU** in Google Merchant Center | +| `content_ids` | array | `view_item`, `add_to_cart`, `ecommerce_purchase` | Product IDs — must exactly match the Merchant Center **ID (`offer_id`)** |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ecommerce-manager/google-commerce-manager.mdx` around lines 96 - 99, Update the description for the `content_ids` parameter to explicitly require the Merchant Center product ID (offer_id) rather than a generic "ID or SKU": locate the `content_ids` entry in the parameter table and replace "Product IDs — must exactly match the **ID or SKU** in Google Merchant Center" with wording such as "Merchant Center product ID (offer_id) — must exactly match the product ID in Google Merchant Center" so implementers cannot send alternative catalog keys or SKUs.
213-213: Link text implies multiple SDK guides, but only one SDK link is provided.Line 213 says “in each SDK guide” while linking only to React Native. Consider either linking all SDK ecommerce sections or changing the sentence to reference React Native specifically.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ecommerce-manager/google-commerce-manager.mdx` at line 213, The sentence linking "Ecommerce Events section" currently points only to the React Native guide while the text says "in each SDK guide"; update the copy to be accurate by either adding equivalent links for other SDKs (e.g., Flutter, iOS, Android ecommerce sections) replacing the single URL with multiple SDK-specific links, or change the sentence to reference React Native explicitly (e.g., "refer to the Ecommerce Events section in the React Native SDK guide") so the link target and descriptive text match; locate the sentence starting with "The SDK examples above use React Native syntax." and update the linked anchor text accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@ecommerce-manager/google-commerce-manager.mdx`:
- Around line 96-99: Update the description for the `content_ids` parameter to
explicitly require the Merchant Center product ID (offer_id) rather than a
generic "ID or SKU": locate the `content_ids` entry in the parameter table and
replace "Product IDs — must exactly match the **ID or SKU** in Google Merchant
Center" with wording such as "Merchant Center product ID (offer_id) — must
exactly match the product ID in Google Merchant Center" so implementers cannot
send alternative catalog keys or SKUs.
- Line 213: The sentence linking "Ecommerce Events section" currently points
only to the React Native guide while the text says "in each SDK guide"; update
the copy to be accurate by either adding equivalent links for other SDKs (e.g.,
Flutter, iOS, Android ecommerce sections) replacing the single URL with multiple
SDK-specific links, or change the sentence to reference React Native explicitly
(e.g., "refer to the Ecommerce Events section in the React Native SDK guide") so
the link target and descriptive text match; locate the sentence starting with
"The SDK examples above use React Native syntax." and update the linked anchor
text accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 39a09e82-ac59-44d3-8d0e-9401097881c4
⛔ Files ignored due to path filters (6)
images/ecommerce-event-google/ecommerce-1.pngis excluded by!**/*.pngimages/ecommerce-event-google/ecommerce-2.pngis excluded by!**/*.pngimages/ecommerce-event-google/ecommerce-3.pngis excluded by!**/*.pngimages/ecommerce-event-google/ecommerce-4.pngis excluded by!**/*.pngimages/ecommerce-event-google/ecommerce-5.pngis excluded by!**/*.pngimages/ecommerce-event-google/ecommerce-6.pngis excluded by!**/*.png
📒 Files selected for processing (6)
docs.jsonecommerce-manager/google-commerce-manager.mdxsdk/android.mdxsdk/flutter.mdxsdk/ios.mdxsdk/react-native.mdx
|
for this mention eventData can be sent via sdk capture payment and capture event also |
|
for this also we should mention that eventData can be sent via both sdk methods and data apis |
Shofiya2003
left a comment
There was a problem hiding this comment.
added comments for the changes
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ecommerce-manager/google-commerce-manager.mdx`:
- Around line 72-76: Standardize the canonical identifier wording to always
require Merchant Center's offer_id: update the paragraph that currently says "ID
/ Offer ID" and every later instance that reads "ID or SKU" (and similar
variants) to consistently state "offer_id (Merchant Center ID / offer_id)" and
update the Warning block to read "Make sure the product offer_id you send in
your Linkrunner events exactly matches the Merchant Center offer_id." Replace
occurrences at the noted spots (including the Warning block and the lines
referenced: 72-76, 98, 114, 126, 143, 158, 182, 202, 216) so the doc
unambiguously requires matching Merchant Center offer_id rather than SKU.
- Around line 121-128: The JSON examples for the Capture Event API are missing
the required user_id field; update both event payload examples (the JSON object
with keys token, event_name, install_instance_id, event_data) to include a
top-level "user_id" property with a placeholder value (e.g., "user_123") so the
examples conform to the Capture Event API schema and will produce valid
requests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e2cd39ba-365e-4b33-b812-bf82d3e89722
📒 Files selected for processing (1)
ecommerce-manager/google-commerce-manager.mdx
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (3)
ecommerce-manager/google-commerce-manager.mdx (3)
153-163:⚠️ Potential issue | 🔴 CriticalAdd required
user_idto the Capture Event API example.The Capture Event API requires a
user_idfield, but it's missing from this example.Proposed doc fix
// POST /capture-event { "token": "your_project_token", "event_name": "add_to_cart", + "user_id": "user_456", "install_instance_id": "abc-123", "event_data": { "content_ids": ["sku_blue_tshirt"], // Must match ID or SKU in Google Merchant Center "value": 1598, // Required — total value (Google uses this as revenue) "currency": "INR", // Required "num_items": 2 // Required } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ecommerce-manager/google-commerce-manager.mdx` around lines 153 - 163, The JSON example for the Capture Event API is missing the required user_id field; update the example payload in the Capture Event API sample (the JSON block containing "token", "event_name", "install_instance_id", and "event_data") to include a top-level "user_id" property with a placeholder value (e.g., "user_id": "user_12345") so the example matches the API's required parameters.
121-128:⚠️ Potential issue | 🔴 CriticalAdd required
user_idto the Capture Event API example.The Capture Event API requires a
user_idfield, but it's missing from this example. Users following this documentation will get validation errors when calling the API.Proposed doc fix
// POST /capture-event { "token": "your_project_token", "event_name": "view_item", + "user_id": "user_456", "install_instance_id": "abc-123", "event_data": { "content_ids": ["sku_blue_tshirt"] // Must match ID or SKU in Google Merchant Center } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ecommerce-manager/google-commerce-manager.mdx` around lines 121 - 128, The JSON example for the Capture Event API is missing the required user_id field, which causes validation errors; update the example object (the top-level JSON with keys "token", "event_name", "install_instance_id", and "event_data") to include a "user_id" property (e.g., a string or UUID) alongside those keys so the payload includes "user_id" when sending the capture event that contains "content_ids" under "event_data".
72-76:⚠️ Potential issue | 🟠 MajorUse one canonical identifier rule: match Merchant Center
offer_idexactly.The terminology is inconsistent throughout this page. This warning says "ID / Offer ID" while other locations say "ID or SKU." Using "SKU" as an alternative can mislead integrations if the SKU differs from the Merchant Center
offer_id, breaking attribution.Standardize to always require matching the Merchant Center product
offer_id(also shown as ID in the Merchant Center UI).Proposed doc fix
-Make sure the product `id` you send in your Linkrunner events exactly matches the **ID / Offer ID** of the product in Google Merchant Center. A mismatch will break product attribution and lower your campaign performance. +Make sure the `content_ids` you send in your Linkrunner events exactly match the Merchant Center product **ID (`offer_id`)**. A mismatch will break product attribution and lower your campaign performance.Apply the same fix at lines 98, 114, 126, 143, 158, 182, 202, and 216 to consistently reference "Merchant Center ID (
offer_id)" instead of "ID or SKU."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ecommerce-manager/google-commerce-manager.mdx` around lines 72 - 76, The documentation uses inconsistent terminology ("ID / Offer ID", "ID or SKU", "SKU") which can mislead integrators; update the Warning block and every occurrence that currently says "ID / Offer ID", "ID or SKU", or "SKU" to consistently read "Merchant Center ID (`offer_id`)" (you can parenthetically note it appears as "ID" in the Merchant Center UI) so all references to the product identifier require an exact match to the Merchant Center offer_id; apply this replacement across the page wherever those phrases appear (including the other instances called out in the review) and ensure the Linkrunner event examples and explanatory text require sending the Merchant Center ID (`offer_id`) exactly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ecommerce-manager/google-commerce-manager.mdx`:
- Line 19: The link target
"https://business.google.com/in/merchant-center/replace" is invalid because it
contains a leftover placeholder "/replace"; update the Markdown link in
google-commerce-manager.mdx by removing the "/replace" segment and point it to
the correct Merchant Center URL (e.g.,
"https://business.google.com/merchant-center" or
"https://business.google.com/in/merchant-center") so the anchor
[merchant.google.com](...) resolves to a working page.
- Line 213: Update the sentence starting "The SDK examples above use React
Native syntax..." to fix the cross-reference inconsistency by either
(recommended) changing the link target to a general "Ecommerce Events" hub or
separate platform anchors so it directs readers to their specific SDK guide
(Flutter, iOS, Android, React Native) instead of only React Native, or
(alternatively) reword the sentence to explicitly state the linked page is the
React Native Ecommerce Events guide and add parallel links to the Flutter, iOS,
and Android Ecommerce Events pages; ensure the sentence and link text clearly
match (e.g., reference "each SDK guide (React Native, Flutter, iOS, Android)"
and link each platform to its Ecommerce Events section).
---
Duplicate comments:
In `@ecommerce-manager/google-commerce-manager.mdx`:
- Around line 153-163: The JSON example for the Capture Event API is missing the
required user_id field; update the example payload in the Capture Event API
sample (the JSON block containing "token", "event_name", "install_instance_id",
and "event_data") to include a top-level "user_id" property with a placeholder
value (e.g., "user_id": "user_12345") so the example matches the API's required
parameters.
- Around line 121-128: The JSON example for the Capture Event API is missing the
required user_id field, which causes validation errors; update the example
object (the top-level JSON with keys "token", "event_name",
"install_instance_id", and "event_data") to include a "user_id" property (e.g.,
a string or UUID) alongside those keys so the payload includes "user_id" when
sending the capture event that contains "content_ids" under "event_data".
- Around line 72-76: The documentation uses inconsistent terminology ("ID /
Offer ID", "ID or SKU", "SKU") which can mislead integrators; update the Warning
block and every occurrence that currently says "ID / Offer ID", "ID or SKU", or
"SKU" to consistently read "Merchant Center ID (`offer_id`)" (you can
parenthetically note it appears as "ID" in the Merchant Center UI) so all
references to the product identifier require an exact match to the Merchant
Center offer_id; apply this replacement across the page wherever those phrases
appear (including the other instances called out in the review) and ensure the
Linkrunner event examples and explanatory text require sending the Merchant
Center ID (`offer_id`) exactly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2d3a37f5-f34e-48c1-afbe-51b046d6fe55
📒 Files selected for processing (1)
ecommerce-manager/google-commerce-manager.mdx
|
@claude review |
|
@ChetanBhosale is this gtg? |
Summary by CodeRabbit
New Features
Documentation