Get the Google Analytics 4 Tracking Code – 15-Second Tutorial

If you’ve been pulling your hair out trying to find the tracking code in Google Analytics 4, I’m going to be your hero.

Steps to generate the tracking code for Google Analytics 4

  1. Log in to your Google Analytics and navigate to relevant account
  2. Click “Admin” in the bottom-left corner
  3. Select “Data Streams” from the second column
  4. Click on the data stream you have, or create one if you haven’t set one up yet (just follow the prompts)
  5. In the “Tagging Instructions” section, expand “Global site tag (gtag.js)”

    We did it! It works!

That’s it! There’s your tracking code.

Now I can’t be the only one that was driven completely mad the first time I had to install Google Analytics 4 for someone, simply trying to find the most basic element: the tracking code.

Coming from a decade of working with the older versions of Google Analytics where it was always extremely obvious where to find the code, it was really quite baffling.

Even more baffling, Google searches for “where is the tracking code in Google Analytics 4” and related searches yielded absolutely nothing useful.

Instead, I was bombarded by 30-minute “quick start” guides for GA4 which somehow didn’t even seem to mention this most-fundamental component.

I may never get an answer as to why any of these things are the way they are, but you now have the tracking code you seek, and it’s not even difficult to get to.

You’re welcome.

About Brian Johnson

Brian Johnson is a website developer and designer living in Minneapolis, Minnesota with a passion for code and WordPress. He spends his days building WordPress websites for small businesses, developing new code with the online community, and living life.

Leave a Reply

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