Understanding what happens on your website after a visitor arrives is essential for proving the value of your marketing efforts and making data-driven decisions. Setting up robust conversion tracking is a foundational step in any successful digital strategy. This guide provides a comprehensive walkthrough for setting up Google Tag Manager (GTM), configuring event tracking, and marking key events in Google Analytics 4 (GA4).
Google Tag Manager is a free tool that allows you to manage and deploy marketing tags (like those for Google Analytics) on your website without having to modify your website’s code directly. This saves time and reduces the risk of errors.
Sign up: Navigate to the Google Tag Manager website and click “Sign up for free.” You’ll need to log in with your Google account.
Create a new account: You will be prompted to create a new GTM account.
Enter an Account Name for your business.
Provide a Container Name, which is typically your website’s domain (e.g., yourdomain.co.uk).
Select Web as the target platform for your container.
Complete setup: Click “Create” and accept the terms of service to finalise the account creation process.
After creating your container, GTM will provide you with two snippets of code. These must be added to your website’s HTML template to enable GTM functionality.
Add the first snippet to the <head> section of every page on your website. This ensures that GTM loads as soon as a user visits a page.
Add the second snippet immediately after the opening <body> tag. This snippet acts as a backup for users with older browsers.
If you use a Content Management System (CMS) like WordPress and are not comfortable editing the theme files directly, you can use a plugin like WP Code to easily add this code to the header and body sections of your site.
Once GTM is installed, you can begin to configure tags and triggers to track specific user actions. A tag is the snippet of code that sends data to GA4, while a trigger is the condition that determines when that tag fires.
To simplify the setup process, you can use these pre-configured container files we’ve created to track specific interactions on your website. Download a file which is relevant to you. Below are instructions for importing the three container files:
Or we can create tracking up from scratch following these instructions below:
Navigate to Tags: In your GTM workspace, click on “Tags” in the left-hand menu and then “New.”
Choose a tag type: Click on “Tag Configuration” and select Google Analytics: GA4 Event. This is the tag type you need to send event data to your GA4 property.
Connect to GA4: From the dropdown menu, select your GA4 Configuration Tag. If you haven’t created one, you will need to do this first.
Name the event: Give your event a clear and descriptive name using underscores, as this is the format GA4 uses (e.g., phone_call_click, email_click, form_submission).
Select a trigger: Under the tag you just created, click on “Triggering.”
Create a new trigger: For a simple conversion like a button click, you can create a trigger with the type All Elements or Just Links.
Define the condition: Set the trigger to fire on “Some Clicks,” then specify a unique identifying attribute of the element. For example, if your phone number is in the click text, you can set the condition to Click Text contains 01483 399828. For a purchase conversion, you would create a trigger based on a “Page View” where the Page Path equals the specific URL of your confirmation or “thank you” page.
Download your free copy of our guide for attracting quality leads and growing your business.
After your events are correctly tracked in GTM and begin to appear in GA4, you must mark them as key events to track them as conversions.
Go to the GA4 admin panel: Open your Google Analytics 4 property, then click on “Admin” in the lower left-hand corner.
Find your events: Under the “Data Display” column, click Events. You’ll see a list of all events that have been recently triggered on your website.
Mark as key events: To mark an event as a conversion, simply toggle the switch in the “Mark as key event” column next to the event name.
If your event is not yet in the list, you can manually create it by clicking Create Event and entering the exact event name you defined in GTM.
Setting up robust eCommerce tracking requires additional configuration to capture detailed purchase data.
WordPress (WooCommerce): A plugin such as GTM4WP simplifies this process. After installing the plugin, you can input your GTM container ID and enable “Track enhanced eCommerce” in the advanced settings to automatically send purchase data to GTM.
Shopify: Shopify has native support for GTM. In your Shopify admin panel, go to Online Store > Preferences and enter your GTM container ID.
Custom CMS: For a custom-built website, a developer will need to add a data layer to your confirmation page. This is a JavaScript object that contains all the transaction details and sends them to GTM. You must ensure this script runs only on the confirmation page to prevent tracking duplicate data.
Contact us for a bespoke initial review of your website marketing efforts.
Verifying your setup is crucial to ensure that your tags and triggers are working correctly before you publish them.
GTM Preview Mode: In your GTM workspace, click “Preview.” A new tab will open, allowing you to browse your website while GTM’s debug panel shows you which tags are firing and when. This allows you to check in real-time if your triggers are working as expected.
GA4 DebugView: Open your GA4 property and go to Admin > Data Display > DebugView. This tool allows you to see events appear in real-time, confirming that your data is being sent correctly to your GA4 property and that the event names match your GTM configuration.
By following these comprehensive steps, you will have a robust setup for tracking user interactions and conversions on your website. This foundational setup empowers you to make transparent, data-driven decisions that directly impact your business’s success.
To set up a conversion in GA4, navigate to the ‘Events’ section in your GA4 property, select the desired event, and toggle the ‘Mark as conversion’ switch. This action designates the event as a conversion, allowing it to be tracked and analysed in the conversion reports.
The conversion rate in GA4 is automatically calculated by the platform, dividing the number of conversions by the total number of visitors in a given period, which can be viewed in the ‘Conversions’ report section.
To import conversions into GA4, use data import features or set up data streams to integrate data from external sources, ensuring that the necessary events are tracked as conversions within your GA4 property.
An example of a conversion in GA4 could be completing a purchase, signing up for a newsletter, or downloading a white paper, where each action is tracked as a distinct event and marked as a conversion.
Conversions in GA4 are used to track and analyse user actions that are critical to business goals, helping to understand how effectively the website or app is achieving its intended outcomes.
Conversions typically appear in GA4 reports within 24 hours after the event occurs, allowing time for data processing and analysis. But you can also check them in the debug view of GA4, which in the ‘preview’ of GTM. This allows you to check that the vents will come through.
Conversion paths, or user journey maps, can be analysed in GA4 through the ‘Conversions’ and ‘User Explorer’ sections, providing insights into the sequences of interactions leading to conversions.
Marketing with standards.
Learn the simple steps to more customers. Download your free copy of our guide for attracting quality leads and growing your business.
Get your free website marketing health check. Contact us for a bespoke initial review of your website marketing efforts.
Prefer to message? Chat live now in the bottom corner.
Data-driven marketing to elevate the standards of internet marketing.