Skip to content

feat: Google Shopping Ads - #60

Open
ChetanBhosale wants to merge 5 commits into
mainfrom
chetan/lin-511-google-shopping-ads-ecommerce-event-forwarding
Open

feat: Google Shopping Ads#60
ChetanBhosale wants to merge 5 commits into
mainfrom
chetan/lin-511-google-shopping-ads-ecommerce-event-forwarding

Conversation

@ChetanBhosale

@ChetanBhosale ChetanBhosale commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added Google Commerce Manager to navigation and a redirect from the previous Google Merchant Center path.
  • Documentation

    • Added a Google Commerce Manager setup and attribution guide covering account linking, product feed requirements, event mapping, required event fields, example payloads, and verification.
    • Updated SDK docs (Android, Flutter, iOS, React Native) to cover Meta and Google commerce integrations, mappings, and testing guidance.

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Navigation Configuration
docs.json
Added ecommerce-manager/google-commerce-manager route, included the new page in the pages array, and added a redirect from /ecommerce-manager/google-merchant-center to /ecommerce-manager/google-commerce-manager.
Google Commerce Manager Documentation
ecommerce-manager/google-commerce-manager.mdx
New MDX page covering Merchant Center → Google Ads linking, product catalog requirements, required event payload fields (content_ids, value, currency, num_items, order_id), SDK and HTTP examples, Linkrunner event mapping, and verification/troubleshooting guidance.
SDK Documentation Updates
sdk/android.mdx, sdk/flutter.mdx, sdk/ios.mdx, sdk/react-native.mdx
Generalized ecommerce guidance from Meta-only to Meta or Google: updated eventData descriptions, inline example comments to show Meta vs Google mappings, and updated testing/verification links to include Google Commerce Manager guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Meta-Ecommerce-Event #48: Related ecommerce-manager documentation and docs.json navigation changes (Meta commerce-manager page additions).

Suggested reviewers

  • RathodDarshil

Poem

🐰 A merchant's map with carrots bright,
Google joins Meta in the light,
Pages penned and routes arranged,
Events aligned, IDs exchanged —
Hop, docs hop, and all feels right.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat: Google Shopping Ads' is partially related to the changeset but lacks specificity. While the PR adds Google Commerce Manager documentation and ecommerce event forwarding support, the title is too broad and vague—'Google Shopping Ads' doesn't clearly indicate the core change (adding Google Commerce Manager documentation and updating SDK docs for dual Meta/Google support). Consider a more specific title like 'feat: Add Google Commerce Manager documentation and update SDK guides for Meta/Google ecommerce' to better reflect the actual changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chetan/lin-511-google-shopping-ads-ecommerce-event-forwarding

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
ecommerce-manager/google-commerce-manager.mdx (2)

96-99: Clarify content_ids as Merchant Center id (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

📥 Commits

Reviewing files that changed from the base of the PR and between 9465b6f and 249d6c7.

⛔ Files ignored due to path filters (6)
  • images/ecommerce-event-google/ecommerce-1.png is excluded by !**/*.png
  • images/ecommerce-event-google/ecommerce-2.png is excluded by !**/*.png
  • images/ecommerce-event-google/ecommerce-3.png is excluded by !**/*.png
  • images/ecommerce-event-google/ecommerce-4.png is excluded by !**/*.png
  • images/ecommerce-event-google/ecommerce-5.png is excluded by !**/*.png
  • images/ecommerce-event-google/ecommerce-6.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • docs.json
  • ecommerce-manager/google-commerce-manager.mdx
  • sdk/android.mdx
  • sdk/flutter.mdx
  • sdk/ios.mdx
  • sdk/react-native.mdx

@Shofiya2003

Copy link
Copy Markdown
Collaborator

for this mention eventData can be sent via sdk capture payment and capture event also

When sending events via the [Capture Event API](http://localhost:3001/api-reference/event-capture) or [Capture Payment API](http://localhost:3001/api-reference/revenue-tracking), you need to include specific fields in event_data so Google can correctly attribute conversions and match products in your Merchant Center catalog.

@Shofiya2003

Copy link
Copy Markdown
Collaborator

for this also we should mention that eventData can be sent via both sdk methods and data apis

Note: For full API details and request schemas, refer to the [Capture Event API](http://localhost:3001/api-reference/event-capture) and [Capture Payment API](http://localhost:3001/api-reference/revenue-tracking) documentation.

@Shofiya2003 Shofiya2003 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added comments for the changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 249d6c7 and d7f1bb2.

📒 Files selected for processing (1)
  • ecommerce-manager/google-commerce-manager.mdx

Comment thread ecommerce-manager/google-commerce-manager.mdx
Comment thread ecommerce-manager/google-commerce-manager.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (3)
ecommerce-manager/google-commerce-manager.mdx (3)

153-163: ⚠️ Potential issue | 🔴 Critical

Add required user_id to the Capture Event API example.

The Capture Event API requires a user_id field, 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 | 🔴 Critical

Add required user_id to the Capture Event API example.

The Capture Event API requires a user_id field, 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 | 🟠 Major

Use one canonical identifier rule: match Merchant Center offer_id exactly.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d7f1bb2 and d184e93.

📒 Files selected for processing (1)
  • ecommerce-manager/google-commerce-manager.mdx

Comment thread ecommerce-manager/google-commerce-manager.mdx Outdated
Comment thread ecommerce-manager/google-commerce-manager.mdx Outdated
@ChetanBhosale

Copy link
Copy Markdown
Contributor Author

@claude review

@RathodDarshil

Copy link
Copy Markdown
Collaborator

@ChetanBhosale is this gtg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants