Use Google Tag Manager with SegMetrics
This article provides a step-by-step guide on how to implement SegMetrics with Google Tag Manager (GTM).
Installing the SegMetrics tracking pixel through Google Tag Manager allows you to deploy your SegMetrics tracking to all of your marketing pages without any additional setup or configuration.
> Important Note: We have found that applying the SegMetrics pixel through Google Tag Manager does reduce attribution. It does not appear to be a statistically significant reduction in tracking. But we have found GTM tends to get blocked at a higher rate than if the pixel is applied to your pages directly.
Implement SegMetrics with Google Tag Manager
Google Tag Manager (GTM) is a free application that allows users to remotely alter and activate certain code snippets that fire in a web or mobile app, without requiring direct access to the codebase or an App Store resubmission.
To use GTM you can install a single code snippet that fetches and runs any custom script tags you've set up in GTM's own UI based on your triggers.
The software allows you to alter isolated portions of your code through a relatively intuitive UI, without much risk of altering or breaking the existing functionality of your site.
Get Your Tracking Pixel
SegMetrics comes with its own Tracking Pixel that collects advanced metrics on your leads, including their real lead source, optin URL, UTM codes from when they first hit your site, geo-location and much, much more.
- Go to your Site Setup page (https://app.segmetrics.io/a/settings/snippet) from the gear in the top menu
- You can see the full instructions on how to configure your Pixel under Installing the Tracking Pixel
- Copy your tracking code for use in setting up the tag in following steps. You will need this later.
Configure Google Tag Manager
- Log in to your Google Tag Manager account.
- Select your website's container and click Add a new tag.
- Name the tag SegMetrics Tracking Pixel.
- Under Tag Configuration choose Custom HTML Tag.
- Copy the SegMetrics Pixel from above, and paste the code in the Google Tag Manager HTML container.
- Under Triggering select All Pages.
- Click Save.
- When you're finished creating your tags, click Publish.
Check if the Tracking Pixel is Working
Once you've uploaded all your events, you should check if your Tracking Pixel is working correctly. To check that your pixel is working properly on your live site, follow the instructions under Debugging Your Tracking Pixel.
Frequently Asked Questions
Q: Why does GTM have reduced attribution compared to direct pixel installation?
A: While the reduction is not statistically significant, Google Tag Manager tends to get blocked at a higher rate by ad blockers and privacy tools compared to pixels installed directly on pages. This can result in some tracking data being lost
Q: Should I use GTM or install the pixel directly?
A: For maximum tracking accuracy, we recommend installing the pixel directly on your pages. However, GTM is still a viable option if you need the convenience of centralized tag management and the slight reduction in tracking is acceptable for your use case.
Q: What trigger should I use in GTM for the SegMetrics pixel?
A: Set the trigger to "All Pages" to ensure the SegMetrics pixel fires on every page of your website for comprehensive tracking.
Q: How do I know if my GTM implementation is working correctly?
A: After publishing your tag, use the debugging instructions referenced in the article to verify that your pixel is firing correctly on your live site. You can also check your SegMetrics dashboard for incoming data.
Q: Can I use GTM for specific pages only instead of all pages?
A: Yes, you can create custom triggers in GTM to fire the SegMetrics pixel only on specific pages or under certain conditions. However, for complete user journey tracking, we recommend using "All Pages" as your trigger.