HomeBlogAI TrafficGoogle Analytics 4 now lets you modify and create events using regular expressions

Google Analytics 4 now lets you modify and create events using regular expressions


Google Analytics 4 now supports creating and/or modifying events using regular expressions, regex. This can help you migrate destinations and event goals from Universal Analytics to Google Analytics 4 in a more programmatic fashion.

More details. Google said the new feature and options enable you to define conversions using regular expressions (regex) for web data streams. Just be careful with regex, it can get technical and it is very picky.

Why we care. As we approach the deadline for the GA4 migration from UA3, which is now 87 days away, some are now rushing to migrate not just to GA4 but also to migrate all their goals and events. This may help some of you with that migration since regex can be a super powerful way to match old events and migrate them in a more programmatic manner.

How it works. Google explained that to avoid using malformed regex that may impact your site performance, follow these best practices:

  • Before you use regex, use other operators where possible (e.g., exact matches, contains).
  • Test your regex against expected inputs and ensure that it’s matching what you expect.
  • If case sensitivity is important, specify your regex to be case sensitive. Use the option that doesn’t say “(ignore case)”.

Google notes you should avoid unbounded or nested repetitions where matching time can increase exponentially. Also make sure to define a maximum number of expected repetitions.

What it looks like. Here is a screenshot of this interface for using regular expressions:

Google Analytics Regex 800X503

New on Search Engine Land

About the author

Barry Schwartz

Barry Schwartz a Contributing Editor to Search Engine Land and a member of the programming team for SMX events. He owns RustyBrick, a NY based web consulting firm. He also runs Search Engine Roundtable, a popular search blog on very advanced SEM topics. Barry can be followed on Twitter here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Funnels Blog Logo

Learn more about sales funnels, email marketing, and entrepreneurship with detailed tutorials, tips and tricks, news, reviews, and more.

Categories

Copyright 2022 Funnels Blog. All Rights Reserved.

How To Write Copy That Sells

Get FREE access to the first video of our new course and learn:

✅ How to get people to give you money simply by writing texts.
✅ How you can launch and sell your offers at a much faster rate.
✅ The method to easily writing complete sales pages and email newsletters to sell your offers.

SaaS-System-Image-1.webp
best-rated-course-systeme.io