Analytics

Updating the UTMZ Cookie Replicator for 2024

starry night sky pattern

Our new version of the __utmz cookie now includes attribution for paid and organic social

If one thing remains constant in digital marketing, it’s the need for accurate attribution. Understanding where your traffic comes from is crucial to making informed decisions, optimizing campaigns, and maximizing ROI. Sometimes getting attribution from GA4 into other tools can be difficult, that’s where custom solutions like the __utmz cookie replicator come into play. They create a means to gather and store source, medium, and other attribution data, and pass that data to the platform of your choice.

The Legacy of the UTMZ Cookie Replicator

Bounteous’ UTMZ Cookie Replicator has been a staple for marketers needing to replicate the old Google Analytics __utmz cookie. It captured UTM parameters and click IDs like gclid (Google Click ID) and made sure that our analytics tools continued to provide the insights we needed.

This script made it easy to store attribution as variables in Google Tag Manager and then send to whatever data source you need it, such as a CRM. We’ve used it for years to pass attribution data into hidden form fields

But as digital marketing strategies have evolved, so too have the requirements for attribution. Enter the need for an update.

Why We Updated the __UTMZZ Cookie

Over the past few years, social media has taken center stage in the marketing mix, and with it, new challenges in tracking and attributing traffic accurately. While Bounteous’ original script handled gclid seamlessly, it didn’t account for the fbclid (Facebook Click ID) or the nuanced distinction between organic and paid social traffic.

We saw an opportunity to enhance the script to better serve the needs of modern marketers, ensuring that our attribution data remains as accurate as possible.

What we changed in our version of the __utmzz cookie:

  1. Incorporating Paid and Organic Social Attribution
    • Original Capability: The original script was designed primarily with search engine traffic in mind. It worked exceptionally well for gclid, ensuring that paid search traffic was accurately tracked.
    • Our Enhancement: We introduced logic to differentiate between paid and organic social traffic. If a visitor arrives via Facebook, Twitter, Instagram, or TikTok and the URL includes a fbclid, the medium is set to paid_social. If there’s no fbclid, but the referrer is one of these platforms, it’s marked as organic_social. This allows for precise tracking of social media campaigns, which are increasingly important in the marketing ecosystem.
  2. Capturing Facebook Click IDs (fbclid)
    • Original Limitation: While the original script was well-suited to handle Google’s gclid, it didn’t accommodate fbclid, a critical parameter for tracking Facebook ads.
    • Our Enhancement: We added support for fbclid, ensuring that traffic from Facebook ads is properly attributed as paid social. This update is crucial for marketers who rely on Facebook for driving paid traffic and want to ensure that their CRM and analytics platforms reflect the true origin of these visitors.
  3. Future-Proofing Attribution Tracking
    • Original Scope: The original script was built for a specific set of marketing conditions, primarily focused on search.
    • Our Enhancement: By expanding the script’s capabilities, we’ve made it more adaptable to future changes in digital marketing. Whether new social platforms emerge or additional click IDs become important, the enhanced script is designed to evolve with the times.

Download a copy of the cookie file here >

Handling UTM Parameters for TikTok and LinkedIn

While Facebook and Google use click IDs like fbclid and gclid for tracking, TikTok and LinkedIn rely on UTM parameters. Our updated __utmzz cookie captures UTM parameters directly from the URL and stores them to ensure accurate attribution for these platforms.

  • TikTok and LinkedIn Traffic: The __utmzz cookie captures and stores UTM parameters from TikTok and LinkedIn campaigns, ensuring accurate attribution even if users convert later.
  • Consistency Across Platforms: By supporting UTM parameters, the cookie provides consistent attribution for all traffic sources, regardless of platform-specific tracking methods.

A Nod to Bounteous

While we’ve made significant updates, it’s important to acknowledge the solid foundation laid by Bounteous. Their UTMZ Cookie Replicator was a game-changer when it was introduced, and our enhancements build on their innovative work. You can explore their original work here and on their GitHub repository.

With these updates to the UTMZ Cookie Replicator, you can rest assured that your attribution data is accurate, actionable, and ready to support your marketing strategies. Whether you’re running complex paid search campaigns, leveraging social media for organic reach, or navigating the interplay between both, these enhancements ensure that your tools are as sophisticated as your strategies.

If you’re interested in learning more or need help implementing these updates, we’re here to help.

Posted in Analytics