<script>
if(typeofrwg_token!=='undefined'){merchant_id=// Write your own logic here assigning the merchant id valuedocument.cookie="_rwg_token="+rwg_token+";_merchant_id="+merchantid+";max-age=2592000;domain=rootdomain.com;path=/";}
</script>
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eConversion Tracking v2 requires storing the \u003ccode\u003erwg_token\u003c/code\u003e and the associated \u003ccode\u003emerchant_id\u003c/code\u003e to determine \u003ccode\u003emerchant_change\u003c/code\u003e value upon conversion.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003emerchant_change\u003c/code\u003e value indicates whether the conversion occurred with the original merchant (value 2) or a different one (value 1).\u003c/p\u003e\n"],["\u003cp\u003eGoogle's conversion attribution window is 30 days, covering various user journeys across different channels and devices.\u003c/p\u003e\n"],["\u003cp\u003eConversion events should be sent from all platforms (web and app) where users might complete a purchase after interacting with a place action link.\u003c/p\u003e\n"],["\u003cp\u003eCross-device attribution is expected if the token is stored at the user level, ensuring conversions are tracked across devices for the same user.\u003c/p\u003e\n"]]],["Conversion Tracking v2 requires storing the `rwg_token` and associated `merchant_id`. When a conversion occurs, send a JSON object including `conversion_partner_id`, `rwg_token`, and `merchant_changed` (1 if the merchant differs from the original, 2 if it's the same). A 30-day attribution window applies, and conversion events are required across all platforms. Provide cross-device attribution if the token is user-level; otherwise, device-level attribution is sufficient. Use specific production and sandbox endpoints for the requests.\n"],null,["Overview\n\nImplementing Conversion Tracking consists of two parts: storing and returning\nthe `rwg_token`. These remain the same but to be compliant with Conversion\nTracking v2 you must now return a new value: `merchant_changed`.\n| **Note:** Before starting, it's helpful to familiarize yourself with the [conversion tracking](/actions-center/verticals/appointments/redirect/integration-steps/conversion-tracking) section of the integration steps. The document may differ from the document your team reviewed while completing your integration.\n\nChanges to persisting the token\n\nWhen persisting the token, you will now be required to store the merchant\nassociated with the action link. This is typically done by matching the merchant\nwith the corresponding `merchant_id`.\n\nThe following is an example of device level conversion tracking, storing these\nvalues in a web browser using a 1st party cookie. This example assumes you have\nparsed the token value into a variable and have implemented logic storing the\n`merchant_id`. To use this example, you need to update `rootdomain` with your\ndomain. This suggested approach may not work for everyone so partners are free\nto adjust or implementation their own logic as they see fit. \n\n \u003cscript\u003e\n if (typeof rwg_token !== 'undefined') {\n merchant_id = // Write your own logic here assigning the merchant id value\n document.cookie =\n \"_rwg_token=\" + rwg_token + \";_merchant_id=\" + merchantid + \";max-age=2592000;domain=rootdomain.com;path=/\";\n }\n \u003c/script\u003e\n\nChanges to Sending Conversion Data\n\nWhen a user completes a conversion event, The post body should be a JSON encoded\nobject with a new boolean value `merchant_changed`. \n\n {\n \"conversion_partner_id\": \u003cpartnerId\u003e,\n \"rwg_token\": \u003crwg_token_val\u003e\n \"merchant_changed\": 1|2\n }\n\nThe previously stored `merchant_id` is used to determine if the merchant that\ntriggered the conversion event is different than the original merchant. Once\nyou've determined whether the merchant has changed, you'll return the\nappropriate `merchant_changed` value using the following table.\n\n| Merchant Change Value | Requirement |\n|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | This value should be used when a user has left the original merchant's website and completed a purchase through your platform with a different merchant |\n| 2 | This value should be used when the customer completed a transaction through the original Entity (Merchant). |\n\nYou are required to provide a valid `rwg_token` when sending a conversion event.\nFor testing purposes, use the following test token in both environments until\nyou are ready to launch: \n\n AJKvS9WeONmWKEwjG0--HdpzMq0yAVNL8KMxbb44QtbcxMhSx_NUud5b8PLUBFehAIxOBO-iYRIJOknEFkIJmdsofdVJ6uOweQ==\n\nWhen making the request, use the following endpoints that correspond with your\nenvironment:\n\n- Production: https://www.google.com/maps/conversion/collect\n- Sandbox: https://www.google.com/maps/conversion/debug/collect\n\nConversion Attribution Requirements\n\nGoogle's required standard for conversion attribution is a 30-day attribution\nwindow for any interaction with a place link, at any store.\n| **Note:** This attribution framework may be different from how your analytics system attributes conversions. This system is designed to operate independently of any conversion tracking you are doing in your systems, and shouldn't affect your internal analytics.\n\nThis attribution window means that Google would expect a conversion event to be\nsent in any of the following scenarios:\n\n- A user follows a place action link and places an order for the same merchant in the same session(Merchant Change Value = 2 )\n- A user follows a place action link and then returns from a different channel within the 30 day window to place an order for the same merchant. ( Merchant Change Value = 2 )\n- A user follows a place action link and then places an order at a different store, either within the same session or a different session within a 30 day window. ( Merchant Change Value = 1 )\n\nAdditionally, Google expects conversion events to be sent from all surfaces a\nuser can land into from a place action link. Including:\n\n- Desktop or mobile web applications\n- Mobile apps, either through an app deep link or a registered app-intent for your domain\n\nIf the token is stored at the user level (see persisting the token), it is\nexpected that you provide cross-device attribution. That is, a user who follows\nan action link from the desktop and then completes the transaction on mobile\n(using the same user account), should trigger a conversion event.\n\nIf the token is stored exclusively at the device level, such as in browser\ncookies, it is not expected that you provide cross-device attribution. In this\ncase, each device would have a separate token persisted if the user had followed\nan action link on that device, and each device would follow the attribution\nrules separately."]]