Stay organized with collections
Save and categorize content based on your preferences.
Instructions
There are 3 phases for implementing conversion tracking:
Setting up Google Analytics(GA) site tag
Persisting Actions Center URL parameter
Sending Conversion Data
Google Analytics site Tag setup.
Work with you Google contact to generate a Measurement ID
for your Actions Center account.
Add the following code snippet after the head tags on all web pages
that:
a conversion can occur
the landing page for all action_links that are Reserve with
Google enabled.
No Existing Google Analytics Integration
If this is the first time creating a Google Analytics site(gtag.js), use the
following code snippet:
<!--Globalsitetag(gtag.js)-GoogleAnalytics-->
<scriptasyncsrc="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID_PROVIDED_BY_GOOGLE"></script>
<script>
window.dataLayer=window.dataLayer||[];functiongtag(){dataLayer.push(arguments);}gtag('js',newDate());gtag('config','GA_MEASUREMENT_ID_PROVIDED_BY_GOOGLE',// Replace with Measurement ID{// DO NOT EDIT THE BELOW MENTIONED PARAMETERS// AS OVERRIDING RESULTS IN SENDING US PII INFORMATION.'referrer':undefined,'page_title':undefined,'page_path':undefined,'page_location':undefined,'send_page_view':false,'anonymize_ip':true,'groups':'reserve_with_google'});
</script>
Existing Google Analytics Integration
If you already have a Google Analytics site tag(gtag.js) for an existing
integration, use the following code snippet:
gtag('config','GA_MEASUREMENT_ID_PROVIDED_BY_GOOGLE',//Replace with Measurement ID{'referrer':undefined,'page_title':undefined,'page_path':undefined,'page_location':undefined,'send_page_view':false,'anonymize_ip':true,'groups':'reserve_with_google'});
Update the above mentioned code snippets with the generated Measurement ID
for your account.
Persisting Actions Center URL Parameter
To properly track conversions from action link(s), Google will
set a URL parameter rwg_token, which should be returned at the
time of a conversion.
You will be required to persist the rwg_token URL parameter
which will be appended to all action links provided by you for a maximum
duration of 30 days when a user visits the landing page via Google. The
preferred way to persist this information is via cookies.
Add the following script on the landing page for all your
action_link(s) that are Actions Center enabled.
When a user completes a transaction which originated from a Google Place
Action link, you need to trigger the code mentioned below in order to
complete conversion tracking.
<script>
functiongetCookie(cname){varname=cname+"=";vardecodedCookie=decodeURIComponent(document.cookie);varca=decodedCookie.split(';');for(vari=0;i<ca.length;i++){varc=ca[i];while(c.charAt(0)==' '){c=c.substring(1);}if(c.indexOf(name)==0){returnc.substring(name.length,c.length);}}return"";}if(leadFromReserveWithGoogle()){// implement a function to identify the conversion is originating via Googlegtag('event','rwg_conversion',{'rwg_token':getCookie('_rwg_token'),'send_to':'reserve_with_google'});}
</script>
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-20 UTC."],[[["\u003cp\u003eImplement conversion tracking for Reserve with Google on your website by installing the Google Analytics site tag and obtaining a unique Measurement ID.\u003c/p\u003e\n"],["\u003cp\u003ePersist the \u003ccode\u003erwg_token\u003c/code\u003e URL parameter, received from Google, in a cookie for up to 30 days to track user journeys originating from Google.\u003c/p\u003e\n"],["\u003cp\u003eTrigger a conversion event in Google Analytics with the stored \u003ccode\u003erwg_token\u003c/code\u003e when a user completes a Reserve with Google transaction on your site, ensuring no PII is transmitted.\u003c/p\u003e\n"]]],["To track conversions for Actions Center Dining Integration, partners must first obtain a `Measurement ID` from Google and integrate it into their website's code via a Google Analytics (GA) site tag. This tag should be placed on pages where conversions occur. Secondly, they need to persist the `rwg_token` URL parameter, provided by Google for each action link, using cookies for up to 30 days. Finally, upon a user completing a transaction, the code needs to trigger the `rwg_conversion` event, including the stored `rwg_token`. Partners don't have to create their own GA accounts.\n"],null,["| **Objective:** Implement conversion tracking for Actions Center Dining Integration using Google Analytics.\n| **Note:** Please ensure that as part of conversion data, user Personal Identification Information (PII) should **not** be sent to Google without expressed user consent or as otherwise permitted under law.\n| **Note:** Partners do **not** need to set up their own Google Analytics account in order to participate in conversion tracking.\n\nInstructions\n\nThere are 3 phases for implementing conversion tracking:\n\n1. Setting up Google Analytics(GA) site tag\n2. Persisting Actions Center URL parameter\n3. Sending Conversion Data\n\nGoogle Analytics site Tag setup.\n\nWork with you Google contact to generate a `Measurement ID`\nfor your Actions Center account.\n| **Key Point:** Store this Measurement ID , as this will be required to implement conversion tracking for your account.\n\nAdd the following code snippet after the `head` tags on all web pages\nthat:\n\n- a conversion can occur\n- the landing page for all `action_links` that are Reserve with Google enabled.\n\nNo Existing Google Analytics Integration\n\nIf this is the first time creating a Google Analytics site(gtag.js), use the\nfollowing code snippet: \n\n```javascript\n\u003c!-- Global site tag (gtag.js) - Google Analytics --\u003e\n\u003cscript async src=\"https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID_PROVIDED_BY_GOOGLE\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config',\n 'GA_MEASUREMENT_ID_PROVIDED_BY_GOOGLE', // Replace with Measurement ID\n {\n // DO NOT EDIT THE BELOW MENTIONED PARAMETERS\n // AS OVERRIDING RESULTS IN SENDING US PII INFORMATION.\n 'referrer' : undefined,\n 'page_title' : undefined,\n 'page_path': undefined,\n 'page_location': undefined,\n 'send_page_view': false,\n 'anonymize_ip': true,\n 'groups': 'reserve_with_google'\n });\n\u003c/script\u003e\n```\n\nExisting Google Analytics Integration\n\nIf you already have a Google Analytics site tag(gtag.js) for an existing\nintegration, use the following code snippet: \n\n```javascript\ngtag('config',\n 'GA_MEASUREMENT_ID_PROVIDED_BY_GOOGLE', //Replace with Measurement ID\n {\n 'referrer' : undefined,\n 'page_title' : undefined,\n 'page_path': undefined,\n 'page_location': undefined,\n 'send_page_view': false,\n 'anonymize_ip': true,\n 'groups': 'reserve_with_google'\n });\n```\n\nUpdate the above mentioned code snippets with the generated Measurement ID\nfor your account.\n\nPersisting Actions Center URL Parameter\n\nTo properly track conversions from `action link`(s), Google will\nset a URL parameter `rwg_token`, which should be returned at the\ntime of a conversion.\n\nYou will be required to persist the `rwg_token` URL parameter\nwhich will be appended to all action links provided by you for a maximum\nduration of 30 days when a user visits the landing page via Google. The\npreferred way to persist this information is via cookies.\n| **Note:** The value of the `rwg_token` should be stored and returned without any edits.\n\n1. Add the following script on the landing page for all your `action_link`(s) that are Actions Center enabled.\n2. Update the rootdomain with your domain.\n\n```javascript\n\u003cscript\u003e\n var query = location.search.substring(1);\n var params = query.split('&');\n var rwg_token = undefined;\n for (var i = 0; i \u003c params.length; ++i) {\n var pair = params[i].split('=');\n if (pair[0] == 'rwg_token') {\n rwg_token = decodeURIComponent(pair[1]);\n break;\n }\n }\n if (typeof rwg_token == 'undefined') {\n document.cookie =\n \"_rwg_token=\" + rwg_token + \";max-age=2592000;domain=rootdomain.com;path=/\";\n }\n\u003c/script\u003e\n```\n\nSending Conversion Data\n\nWhen a user completes a transaction which originated from a Google Place\nAction link, you need to trigger the code mentioned below in order to\ncomplete conversion tracking.\n**Note:** When triggering this event, you will need to provide the `rwg_token` value described in the previous step. \n\n```javascript\n\u003cscript\u003e\n function getCookie(cname) {\n var name = cname + \"=\";\n var decodedCookie = decodeURIComponent(document.cookie);\n var ca = decodedCookie.split(';');\n for(var i = 0; i \u003cca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n }\n\n if (leadFromReserveWithGoogle()) { // implement a function to identify the conversion is originating via Google\n gtag('event', 'rwg_conversion', {\n 'rwg_token': getCookie('_rwg_token'),\n 'send_to': 'reserve_with_google'\n });\n }\n\u003c/script\u003e\n```"]]