Page Summary
-
This guide focuses on implementing conversion tracking using Google Tag Manager for Google Analytics, specifically when the recommended gtag.js method is not used.
-
Conversion tracking involves two main steps: creating a Custom HTML Tag and a Google Analytics: GA4 Event Tag.
-
The
rwg_tokenURL parameter, which Google appends to action links, must be persisted for 30 days, ideally via cookies, and returned without alteration. -
A Custom HTML Tag containing JavaScript should extract and persist the
rwg_tokenfrom the URL on every page view. -
The GA4 Event Tag is configured to forward the persisted
rwg_tokento Google with the event namerwg_conversionwhen a user completes a transaction from a Google Place Action link.
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.