Using Google Tag Manager for conversion tracking

  • This guide outlines how to implement conversion tracking using Google Tag Manager for websites already utilizing GTM for tag management.

  • The process involves creating a Custom HTML Tag to store a unique token (rwg_token) from Google's action links for 30 days using cookies or a data layer variable.

  • A Google Analytics: GA4 Event Tag is then used to send the stored rwg_token to Google with the 'rwg_conversion' event, using your designated Measurement ID.

  • This setup ensures accurate tracking of conversions originating from Google Place Action links, allowing you to measure the effectiveness of your campaigns.

  • User Personal Identification Information (PII) should not be sent to Google as part of the conversion data without explicit user consent or legal permission.

Instructions

There are 2 steps for implementing conversion tracking:

  • Create a new Custom HTML Tag
  • Create a new Google Analytics: GA4 Event Tag

Custom HTML Tag

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_link(s) provided by you for a duration of 30 days when a user visits the landing page via Google. If a user visits the page through an action link again during the 30 day period, the existing rwg_token should be replaced with a new token, and the 30 day time to live should be reset. The suggested way to persist this information is via cookies.

Our recommended approach to persist the rwg_token is to create a custom HTML tag, which is fired on every page view. The custom HTML tag should contain javascript which extracts the rwg_token form the url parameter and persists the rwg_token for 30 days. You can persist the data using 1st Party Cookies or a Data Layer Variable.

Google Analytics: GA4 Event Tag

GA4 Event Tag allows you to forward the rwg_token to Google using the correct measurement ID.

When configuring the GA4 Event Tag, you are required to initiate the following fields:

  • Configuration Tag: Set this to None : Manually set ID.
  • Measurement ID Set the appropriate Measurement ID for your account.
  • Event Name: Set this to rwg_conversion
  • Event Parameter: Add a new Event Parameter rwg_token. The value of this token should be the persisted value of the token.

Each GA4 Event Tag needs to be associated with a Trigger. You should create a trigger which fires this event tag when a user completes a transaction which originated from a Google Place Action link.