Skip to Content
Main Content

Hiker Looking Out Over Mountains

14 Minute Read | October 21, 2020

GA4 Setup Tips

The (non-) Definitive Guide

Updated: May 20, 2022 
Originally Published: Oct. 21, 2020

Google Analytics 4 - GA4 - came out of beta on October 14, 2020 and has been on a tear ever since.  Every week brings new updates and improvements.  It's an incredibly fun time to be working with GA. 

GA4 is easy to set up and it offers great insights with even a plain-vanilla installation.  However, as with any tool, there are extra steps  you should take to ensure you’re maximizing the GA4 setup for *your* website.

This guide is what I’ve discovered so far. I’ll keep adding to this post as I find more must-have setup tips.

And as the Google blog will remind you: you’re an early adopter! Expect the tool to keep changing quickly.

Index

 

Tip 1: Hostname Filter

A hostname filter has been an essential part of a good GA setup for years. 

The hostname filter verifies that a user is on your website when their visit is recorded. It will block both spam traffic and traffic from your test, staging, or development environments.

If you’ve already set up a hostname filter in your Universal Analytics (UA) account, you may think you can apply it to your GA4 property.  But no – none of the UA filters will work in GA4.

UA filters can't be applied to GA4.

GA4 does collect the hostname – it’s part of every event (page_view, scroll, etc.).  

Like many of the dimensions GA4 collects, it’s not easy to find the hostname in the GA4 UI, but if you search for “hostname”, you’ll find the “Top Hostname by Users” Insights card.

Nice!

In my case, clicking on that Insight showed me:

  • the valid hostname (labeled 1 in the image – nwsdigital.com)
  • invalid hostnames (labeled 2 – they’re all different test environments)

How to create a hostname filter in GA4

So far, there’s actually no way to create a valid hostname filter in GA4. But you can create one in Google Tag Manager (GTM). 

In my case, I created a variable in GTM – a super-simple Lookup Table which checks the hostname (1). If it’s www.nwsdigital.com (2), then I output the GA4 Measurement ID (3). 

This Lookup Table variable is then used in my GA4 configuration tag for the measurement ID:

Setting up a GA4 hostname filter with more than one hostname

It's not unusual to have more than one valid hostname.  You may have separate domains for your marketing-automation tool, your payment processor, your cross-domain sites, etc.  

You could still use a Lookup Table in GTM and add an additional row for each valid hostname.  Or you could us a RegEx table. 

I like RegEx tables, particularly if you have subdomains to work with.  Here's what a GTM RegEx table would look like:

And then, of course, you would change the GA4 Tag to use the RegEx table.

Note: GA4 can be configured either via gtag (the Global snippet) or GTM. I configure everything through GTM (and recommend it in almost every case). 

If you do use gtag, you won't be able to set up this type of hostname filter; it's only doable through GTM.

Other ways to see the hostname in the GA4 UI

At the beginning of this section, I talked about the Insights Card "Top Hostnames by User". 

By default, that's the only way to see your hostnames in the UI, and you can't change the date range on that card. 

If you wanted to see the hostnames that have been collected, you can see them in the Explore Hub.

Go into the Explorations, click on the "+" for dimensions (A), search for "hostname" (B) and click "Apply.

"Hostname" will then show in the list of dimensions.

You can drag the "hostname" dimension to a row, adjust the date range, and see the hostnames that have been collected.  This is where you can look to verify which hostnames should be allowed, and which blocked.

Summary

In Universal Analytics, the hostname filter is set up in the “Filters” section in Admin and applied to a view. GA4 doesn’t have the same construct, but with a fairly simple tweak to GTM, you can build your own hostname filter. Well worth doing.

A word of caution, though: make sure to *test* your hostname filter, otherwise you might inadvertently block valid traffic.  As we saw, a  valid hostname filter will include your main domain and may also include separate domains for your marketing, blogs, cross-domain sites, etc.

(Shoutout to Mateusz Bratko for pointing out some updates to this section!)

(back to index)

Tip 2: When You Create a New GA Property, set up both GA4 AND Universal Analytics (the "old" GA)

If you’re creating a new GA property (which you do in the GA / Admin section), it may seem like you can only create a GA 4 property (1).

But no! Click on “Show advanced options” (2).

In the advanced options, you’ll see you can toggle the switch for “Create a Universal Analytics property” (1). I recommend doing this.

I would create both a GA 4 and UA property (2).

(As another tip, go ahead and set up the UA property using my 10 GA Admin pro tips.)

I think you're well served to have both GA4 and UA running at the same time.  You can compare what you're getting between the two versions, to make sure your GA4 set up is done correctly.  Also, many of the third-party tools which can read and integrate GA information rely on using "views" (old GA), not "streams" (new GA).  Examples include Moz and Screaming Frog, but there are many more.  The tool vendors will catch up - probably quickly - but in the meantime you don't want to lose that integration.

(back to index)

Tip 3: Check Your Site-Search Settings

GA 4 will track several user interactions by default: page views, outbound links, downloaded files, scroll, video plays, and site-search terms. Those site-search terms are a great insight into your website visitors – they’re typing, into your website’s search box, exactly what they’re looking for.  You definitely want to capture those.

Different websites use different conventions to indicate a search term. Some use the word “query” to show that; other common examples are “s” or “keyword”.

To see what your website uses, go to the search bar and type in something, then look at the URL. You’ll see something like this:

If the word or letter your website uses to designate a search term is “q,” “s,” “search,” “query,” or “keyword,” you’re in luck. Those are all covered by the default GA4 setting.

If you have something different, like we do on the Northwoods website, you have to make an adjustment.  The phrase that designates a search term on our website is “Search_Keywords”.

If you don’t have one of the default search terms, let’s walk through how to make sure your search terms are being tracked.

To do these steps, you will need “Edit” rights in your GA4 account.

1. Go into the GA 4 Admin screen and click on the “Data Streams” option.

2. Click on the right arrow on your Web property.

3. In the “Enhanced measurement” window that opens up, click on “Show advanced settings” under Site search.

4. You can see the default search term parameters that already exist (in box 1). In box 2, type in the term or letter that your website uses to designate a search term. In Northwoods’ case, that’s “Search_Keywords." Then “SAVE” your work.

5. That's it! From this point forward, any search terms entered onto the site by your users will be captured.

(back to index)

Tip 4: Check your "Data Retention" Settings

While you’re in the GA 4 admin, go to “Data Retention” under the Data Settings Option.

By default, the data retention is set to "2 months."

You probably want to set that to the other option, 14 months.

There's much confusion over what this setting does.  It has no impact on the standard aggregated reports in the UI - you'll be able to see information in those reports going back as long as you've collected data.

The setting does have an impact on the Explorations, though - if you are building your own set of reports, you won't be able to go back more than the 2 months or 14 months you specified.  So it's a good idea to choose 14 months if you want any type of meaningful time-based Explorations.  

Also: Note the toggle for “Reset user data on new activity." By default, that’s on, which makes sense. It just means that regardless of which limit you choose (2 months or 14 months), each time a user comes to your website, the clock resets on when their data will be deleted.

Make sure to "Save" your changes!

 

(back to index)

Tip 5: Create Custom Insights

Here’s the best tip so far – not only because some day it’ll warn you about something catastrophic happening on your website, but because it’s kind-of hidden.

GA4 relies on machine-learning (ML) insights to supplement the stripped-down UI. Got something weird happening on your site? Ideally, an insight will report on that anomaly. But there are also some custom insights you'll want to enable.

The insights are available in a couple of places, including on the home page (1). Go ahead and click on “View all insights” (2).

In the next page (home / insights), click on "Create."

You’ll see a list of four “custom insights," all four of which could be important (depending on your website). But one of them will be important for all websites – the “Anomaly in daily views” (1). Here’s where you can set up a notification, which could be e-mailed to you, letting you know about anomalies in page views – e.g. you had zero page views today. I bet something’s broken!

Go ahead and click on the “Review and create” link (2).

Now you have a choice of specifying exactly what you want to be notified about. I can’t tell you how happy this makes me. It’s a wonderful practice to set up notifications when things are going wrong on your website. Most people don’t do this (it’s done through custom alerts in the older version of GA), but GA4 makes it very easy to set up. So easy, in fact, that I would accept the default of “Has anomaly." I think GA4’s ML will be able to figure this out just fine. I would for sure create the “daily views” custom insight; you can decide if it makes sense for your website to also enable the other custom insights.

Even better – you can create your own custom insights from scratch.

As small as these custom insights may seem, this is one of my favorite little features of GA4. I love proactively setting up alerts and it’s so frickin’ easy to do here. Nicely done, GA4 team!

Specify the e-mails of the people you want notified:

When you’re all done, go ahead and press the “Create” button.

When an anomaly happens, you'll get an e-mail like this one, which I got the day after I set up the hostname filters in tip 1:

At some point in the future, when that anomaly fires and you’re able to go in and resurrect your website tracking because something stupid broke – please send me an e-mail and thank me!

(back to index)

Tip 6: Create Filters for Internal Traffic (but don't make them live)

I know what you’re doing – you’re looking in the admin area to set up your filtered view, raw view, and test view.  Right? Right?

(How do I know? Because only well-trained GA nerds would be reading this far into this blog post.)

Well, stop looking – there are no views and there’s no way to set up those views. At least as of right now. (A Google webinar I  attended recently said they would be coming at some point - so don't lose hope.)

There are filters, though, which you can use for either internal traffic or dev/test environments. Let’s walk through setting up an “internal traffic” filter.

Start in the admin section of GA (1) and click on the “Data Streams” (2).

Click on the web stream for which you’ll create the filters:

Go to "Tagging Settings":

Click on "Define Internal Traffic":

Click on "Create":

You’ll now have your first opportunity to start adding an IP address (or multiple - up to 10 rows). Put in the name of the configuration (1), the match type (2), and the IP address (3).  

There are multiple match types, but no RegEx option(!!).  I can't tell you how painful that omission is.

Here’s a sample configuration filled out for my home IP address:

IMPORTANT: Even though GA4 uses “Anonymize IP” (dropping off the last octet in the IP address), for the “IP Address equals” option, you have to use the full IP address.

Save your changes. You’ll now see that configuration show up in your list of “internal traffic” rules.

Next, go back to “GA Admin / Data Settings / Data Filters”.

Make sure the Data Filter for Internal Traffic is set up. (I think this happens by default; I don’t think you have to do anything. But check to be sure.)

Now What?

Now you wait patiently. You won’t see any results of this filter until the next day.

The next day, you can use the dimension “Test data filter name” to look for traffic that is labeled “internal” or “not set” (i.e. external). Here is an example of the filter:

And here's where you can use it in a report in the UI:

You could also use it in the Analysis Hub, as a dimension for any of the reports you build.  As a simple example:

  1. Specify a date range which includes the internal-traffic being set up.
  2. If the dimension is not there, click the + button and add the…
  3. “Test data filter name” dimension. 
  4. Choose an Exploration report.
  5. Drag or choose the “Test data filter name” to the “Rows” section.
  6. You’ll now see the internal traffic and the not-set traffic.

Expect changes with the internal traffic filter

The IP filtering is so limited in GA4 compared to UA that I have to believe it'll be updated soon.  The lack of RegEx in the match type is perhaps the biggest limitation right now - hard to see how to create an "internal traffic" channel for a large multi-site organization without having RegEx.  Plus, of course, not having views available is painful. My personal opinion is that we'll see changes here in the near-term future.

Make the Internal Traffic Filter Live?

I think it’s great to set up the internal traffic filter – but leave it in test mode. You can always do your analysis and exclude that segment, either in the GA4 interface or in Big Query. But since there is only one “view” in GA 4, I’m reluctant to start excluding traffic that you’ll never get back. Mess up that IP filter and the data is gone forever – there’s no raw view on which to fall back.

But if you *really* want to make the internal-traffic filter live

Here's how. 

  1. In the GA4 Admin screen, choose Data Settings / Data Filters
  2. Click on the three dots on the "Internal Traffic" line.
  3. Activate the Filter

You'll get a warning screen.  Pay attention to it.  Have you really tested the internal-traffic filter?  Are you sure?  if so, choose "Activate filter".

You'll now see that the internal-traffic filter is active.

Again, my strong recommendation is NOT to make it active.  Without a raw view to fall back on, it's too risky to start excluding traffic, particularly since you can easily filter out the internal traffic in the GA4 UI, in BigQuery, or  in Google Data Studio.

(back to index)

Tip 7: Label Your Exploration Reports

Here’s a simple idea – make sure that every report you create in Explorations has a name.

Otherwise, once you start creating reports, you’ll be hard pressed to remember what’s in the myriad “Untitled exploration” reports.

(back to index)

Tip 8: Set up BigQuery Integration

Honestly one of the most impressive features of GA4 is its built-in integration with BigQuery (part of the Google Cloud Platform). You can set up automatic export of GA4 data directly into BigQuery and specify whether you want to do that once per day, or virtually instantaneous. The “once per day” option is, essentially, going to be free (depending on how much data you have). For the “instantaneous” exports, you’ll have to set up a billing account.

I won’t try to recreate the excellent blog post that Charles Farina wrote on setting up BigQuery – go ahead and follow his steps and in about a day you’ll start getting data like this, which clearly shows the event / parameters structure of GA4:

Why should you care? Ultimately, I suspect much of the GA4 analysis is going to be done based on the data that’s stored in Big Query. Once the data is in BigQuery, you have a whole new world of processing and analysis open to you – much more than you’ll have within GA4 itself.

(back to index)

Tip 9: Leave Your Universal Analytics (the "Old" GA) in Place

The hostname and IP filters are two of many reasons why I think GA4 should run alongside the older version of GA. 

The GA4 UI (user interface) is totally different. It will take some time for all the analysts who worked with the older version – myself included - to truly “grok” the newer version. But by comparing the new to the old, you can understand and dig into the differences. 

When you compare GA4 to Universal Analytics (UA), use the "raw" or unfiltered view in UA (assuming you’ve set that up). The raw view will be the closest to what you’ll see in GA4, because the filtering capabilities are still so limited in GA4.

Thankfully, it's very easy to dual-tag your site and run both Universal Analytics and GA4.  You'll do yourself a favor by running both.

(back to index)

Tip 10: Expand the automatic scroll tracking

One of the enhanced measurements set up by default in GA4 is scroll tracking.  It’s loaded on every page and fires when the visitor gets 90% of the way down the page.

This approach is smart.

Universal Analytics' scroll depth not as smart.  It's usually set to track at the 10, 25, 50, and 75% marks – which means A LOT of noise gets sent to GA.  When you set it up that way, scroll-depth tracking is usually the #1 event, by far, in GA. 

That’s a lot of data and very little information.

GA4’s approach, by contrast, is a nice attempt to capture meaningful data and not inundate with noise.  

Sometimes, though, you’ll want to track scroll depth at more than just the 90% mark – e.g. for blogs or other long-form content. Personally, I like to track those at the 25, 50, and 75% marks.

There’s good news!  If you already have scroll-depth-tracking set up in GTM for your UA implementation, it’s easy to adjust to GA4.

Note: if you’re interested in this tip, I’m going to assume you already have scroll-depth set up in GTM.  If you haven’t set it up yet, you have two options:

  • Download a container file with scroll-depth tracking already set up. (This is just one of the many excellent resources from Julius Fedorivicius at analyticsmania.com.)
  • Learn how to do it yourself (courtesy of the fine folks at seerinteractive.com)

Steps to add more Scroll Tracking in GA4, Using GTM.

Note: I’m going to assume you have some familiarity with Google Tag Manager (GTM), so I’m going to highlight the most important steps you’ll need to take along the way.  The missing steps (like “Click on ‘New’ to create a new tag.”) will be familiar to most people who have worked in GTM a bit.  Please feel free to reach out to me if you’d like further clarification, though.

1. In GTM, you’ll need the “Scroll Depth Threshold” and “Scroll Depth Units” enabled in the built-in variables section. (Your container may also have “Scroll Direction” enabled.)

2. You’ll need a scroll-depth trigger.  Two important notes:

  • You can set the percentages to whatever you want.  In this case, the percentages of 25, 50, 75, and 100% ill end up getting added to the 90% built-in GA4 scroll tracking.

  • I recommend only firing the trigger on certain sections of your site (the “/blog” pages in this example).

3. Create a new tag of type “GA4 Event”.

4. With this new tag (see screenshot for steps):

  1. Name it however you’d like.
  2. Use the name of the GA4 configuration tag you’ve previously set up in GTM.
  3. Make sure to use “scroll” as the event name.  “scroll” is the GA4-recognized event name for the scroll-depth tracking; if you use any other name, set up is going to be harder.
  4. Add event parameter and use “percent_scrolled” for the Parameter Name.  Again, you want to be consistent with what GA4 uses for scroll events.
  5. Use one of the variables you configured in step 1, above - “{{Scroll Depth Threshold}}”.
  6. Finally, use the trigger you set up in step 2, above.

5. Save the tag and then go into GTM Preview mode.

6. You can either look at the events in GTM’s Preview tab, or in GA4’s Debug View.  I’ll show the latter.

7. Go to the DebugView in GA4 (“A” in screenshot below).  On your website, go to one of the pages where you set up the extra scroll tracking (e.g. the /blog pages, in my example.)  Scroll down the page.  You’ll see the scroll events show up in the DebugView (“B” in screenshot).

8. Click on one of the “scroll” events so you can see the parameters.  You should see “percent_scrolled”, if you set it up correctly in your GTM tag, along with the value (75% in the screenshot below).

9. That’s it!  You’ve now added supplementary scroll tracking in GA4 to a specific set of your pages.  Nice job!

10. Assuming it’s all working right, go ahead and publish your GTM container. 

(back to index)

Looking for more GA4 tips? Check out our GA4 Resource Hub!

Authored By

Fred Pike

Fred Pike

Managing Director & GA/GTM Practice Lead

hand-drawn owl

Get Expert Tips

36553211/Blog/GA4-Setup-tipsThe (non-) Definitive Guide14
<p><strong>Updated: May 20, 2022&nbsp;<br /> Originally Published: Oct. 21, 2020</strong></p> <p>Google Analytics 4 - GA4 - came out of beta on October 14, 2020 and has been on a tear ever since.&nbsp; Every week brings new updates and improvements.&nbsp; It&#39;s an incredibly fun time to be working with GA.&nbsp;</p> <p>GA4 is easy to set up and it offers great insights with even a plain-vanilla installation.&nbsp; However, as with&nbsp;any tool, there are extra steps &nbsp;you should take&nbsp;to ensure you&rsquo;re maximizing the GA4 setup for *your* website.</p> <p>This guide is what I&rsquo;ve discovered so far. I&rsquo;ll keep adding to this post as I find more must-have setup tips.</p> <p>And as the Google blog will remind you:&nbsp;you&rsquo;re an early adopter! Expect the tool to keep changing quickly.</p> <p><img alt="" class="animate-in lazy" data-alt="Thanks for being an early adopter of GA4 - from Google blog" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-1A.png?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-1A.png?Thumbnail" /></p> <p><a name="content_index">Index </a></p> <ul> <li><a href="#hostname_filter">Hostname Filter</a></li> <li><a href="#new_GA_property">Creating a new GA Property</a></li> <li><a href="#site_search_settings">Site Search Settings</a></li> <li><a href="#data_retention_settings">Data Retention</a></li> <li><a href="#create_custom_insights">Custom Insights</a></li> <li><a href="#internal_traffic_filters">Internal Traffic Filters (for IP Addresses)</a></li> <li><a href="#label_exploration_reports">Label Your Exploration Reports</a></li> <li><a href="#setup_biqquery_integration">BigQuery Integration</a></li> <li><a href="#leave_ua_in_place">Keep Your Universal Analytics (UA)</a></li> <li><a href="#expand_scroll_tracking">Expand the Automatic Scroll Tracking</a></li> </ul> <p>&nbsp;</p> <h2><a name="hostname_filter">Tip 1: Hostname Filter</a></h2> <p>A hostname filter has been an essential part of a good GA setup for years.&nbsp;</p> <p>The hostname filter verifies that a user is on your website when their visit is recorded.&nbsp;It will block both spam traffic&nbsp;and traffic from your test, staging, or development environments.</p> <p>If you&rsquo;ve already set up a hostname filter in your Universal Analytics (UA) account, you may think you can apply it to your GA4 property.&nbsp; But no &ndash; none of the UA filters will work in GA4.</p> <p><img alt="UA filters can't be applied to GA4." class="animate-in lazy" data-alt="UA filters can't be applied to GA4." data-src="/Northwoods-2020/Blogs/GA4-Setup-tips---UA-filters-dont-work-in-GA4.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-tips---UA-filters-dont-work-in-GA4.jpg?Thumbnail" /></p> <p>GA4 does collect the hostname &ndash; it&rsquo;s part of every event (page_view, scroll, etc.). &nbsp;</p> <p>Like many of the dimensions GA4 collects, it&rsquo;s not easy to find the hostname in the GA4 UI, but if you search for &ldquo;hostname&rdquo;, you&rsquo;ll find the &ldquo;Top Hostname by Users&rdquo; Insights card.</p> <p><img alt="" class="animate-in lazy" data-alt="Insights Card: Hostname by Users" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-4A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-4A.jpg?Thumbnail" /></p> <p>Nice!</p> <p>In my case, clicking on that Insight showed me:</p> <ul> <li>the valid hostname (labeled 1 in the image &ndash; nwsdigital.com)</li> <li>invalid hostnames (labeled 2 &ndash; they&rsquo;re all different test environments)</li> </ul> <p><img alt="" class="animate-in lazy" data-alt="Insights Card - Top Hostname by User Insights Card" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-5A.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-5A.jpg?Thumbnail" /></p> <h3>How to create a hostname filter in GA4</h3> <p>So far, there&rsquo;s actually no way to create a valid hostname filter<em> in</em>&nbsp;GA4.&nbsp;But you can create one in Google Tag Manager (GTM).&nbsp;</p> <p>In my case, I created a variable in GTM &ndash; a super-simple Lookup Table which checks the hostname (1).&nbsp;If it&rsquo;s www.nwsdigital.com (2), then I output the GA4 Measurement ID (3).&nbsp;</p> <p><img alt="" class="animate-in lazy" data-alt="GTM Lookup Table with Page Hostname as input and GA4 Measurement ID as output" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-6A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-6A.jpg?Thumbnail" /></p> <p>This Lookup Table variable is then used in my GA4 configuration tag for the measurement ID:</p> <p><img alt="" class="animate-in lazy" data-alt="GA4 Configuration Tag in GTM, with Measurement ID coming from GTM Lookup Table variable" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-7A.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-7A.jpg?Thumbnail" /></p> <h4>Setting up a GA4 hostname filter with more than one hostname</h4> <p>It&#39;s not unusual to have more than one valid hostname.&nbsp; You may have&nbsp;separate domains for your marketing-automation tool, your payment processor, your cross-domain sites, etc.&nbsp;&nbsp;</p> <p>You could still use a Lookup Table in GTM and add an additional row for each valid hostname.&nbsp; Or you could us a RegEx table.&nbsp;</p> <p>I like RegEx tables, particularly if you have subdomains to work with.&nbsp;&nbsp;Here&#39;s what a GTM RegEx table would look like:</p> <p><img alt="" class="animate-in lazy" data-alt="GTM RegEx table for GA4 Measurement ID" data-src="/Northwoods-2020/Blogs/GA4-setup---regex-table.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA4-setup---regex-table.jpg?Thumbnail" /></p> <p>And then, of course, you would change the GA4 Tag to use the RegEx table.</p> <p><img alt="" class="animate-in lazy" data-alt="GA4 tag using RegEx table variable" data-src="/Northwoods-2020/Blogs/GA4-setup---GTM-GA4-tag-with-regex.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA4-setup---GTM-GA4-tag-with-regex.jpg?Thumbnail" /></p> <p>Note: GA4 can be configured either via gtag (the Global snippet) or GTM.&nbsp;I configure everything through GTM (and recommend it in almost every case).&nbsp;</p> <p>If you do use gtag, you won&#39;t be able to set up this type of hostname filter; it&#39;s only doable through GTM.</p> <h3>Other ways to see the hostname in the GA4 UI</h3> <p>At the beginning of this section, I talked about the Insights Card &quot;Top Hostnames by User&quot;.&nbsp;</p> <p><img alt="" class="animate-in lazy" data-alt="GA4 Hostname by Users" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-4A.jpg?Medium" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-4A.jpg?Thumbnail" /></p> <p>By default, that&#39;s the only way to see your&nbsp;hostnames in the UI, and you can&#39;t change the date range on that card.&nbsp;</p> <p>If you wanted to see the hostnames that have been collected, you can see them in the Explore Hub.</p> <p>Go into the Explorations, click on the &quot;+&quot; for dimensions (A), search for &quot;hostname&quot; (B) and click &quot;Apply.</p> <p><img alt="" class="animate-in lazy" data-alt="Search for hostname in analysis hub." data-src="/Northwoods-2020/Blogs/GA4-setup---analysis-hub---look-for-hostname.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA4-setup---analysis-hub---look-for-hostname.jpg?Thumbnail" /></p> <p>&quot;Hostname&quot;&nbsp;will then show in the list of dimensions.</p> <p>You can drag the &quot;hostname&quot; dimension to a row, adjust the date range, and see the hostnames that have been collected.&nbsp; This is where you can look to verify which hostnames should be allowed, and which blocked.</p> <p><img alt="" class="animate-in lazy" data-alt="Report showing hostnames." data-src="/Northwoods-2020/Blogs/GA4-setup---sample-report-showing-hostname.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA4-setup---sample-report-showing-hostname.jpg?Thumbnail" /></p> <p>Summary</p> <p>In Universal Analytics, the hostname filter is set up in the &ldquo;Filters&rdquo; section in Admin and applied to a view.&nbsp;GA4 doesn&rsquo;t have the same construct, but with a fairly simple tweak to GTM, you can build your own hostname filter.&nbsp;Well worth doing.</p> <p>A word of caution, though: make sure to *test* your hostname filter, otherwise you might inadvertently block valid traffic.&nbsp; As we saw, a&nbsp; valid hostname filter will include your main domain and may also include separate domains for your marketing, blogs, cross-domain sites,&nbsp;etc.</p> <p>(Shoutout to Mateusz Bratko for pointing out some updates to this section!)</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="new_GA_property">Tip 2: When You Create a New GA Property, set up both GA4 AND Universal Analytics (the &quot;old&quot; GA)</a></h2> <p>If you&rsquo;re creating a new GA property (which you do in the GA / Admin section), it may seem like you can only create a GA 4 property (1).</p> <p>But no!&nbsp;Click on &ldquo;Show advanced options&rdquo; (2).</p> <p><img alt="" class="animate-in lazy" data-alt="GA Admin - Create GA4 Property" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-8A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-8A.jpg?Thumbnail" /></p> <p>In the advanced options, you&rsquo;ll see you can toggle the switch for &ldquo;Create a Universal Analytics property&rdquo; (1). I recommend doing this.</p> <p>I would create<strong> both</strong> a GA 4 and UA property (2).</p> <p><img alt="" class="animate-in lazy" data-alt="Recommended: Create both a GA4 and Universal Analytics property." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-9A.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-9A.jpg?Thumbnail" /></p> <p>(As another tip, go ahead and set up the UA property using my <a href="/Blog/Google-Analytics-Admin-Tips-to-Improve-Data-Collection" linktype="8" target="_blank">10 GA Admin pro tips</a>.)</p> <p>I think you&#39;re well served to have both GA4 and UA running at the same time.&nbsp; You can compare what you&#39;re getting between the two versions, to make sure your GA4 set up is done correctly.&nbsp; Also, many of the third-party tools which can read and integrate GA information rely on using &quot;views&quot; (old GA), not &quot;streams&quot; (new GA).&nbsp; Examples include Moz and Screaming Frog, but there are many more.&nbsp; The tool vendors will catch up - probably quickly - but in the meantime you don&#39;t want to lose that integration.</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="site_search_settings">Tip 3: Check Your Site-Search Settings</a></h2> <p>GA 4 will track several user interactions by default: page views, outbound links, downloaded files, scroll, video plays, and site-search terms.&nbsp;Those site-search terms are a great insight into your website visitors &ndash; they&rsquo;re typing, into your website&rsquo;s search box, exactly what they&rsquo;re looking for.&nbsp; You definitely want to capture those.</p> <p>Different websites use different conventions to indicate a search term.&nbsp;Some use the word &ldquo;query&rdquo; to show that; other common examples are &ldquo;s&rdquo; or &ldquo;keyword&rdquo;.</p> <p>To see what <em>your</em> website uses, go to the search bar and type in something, then look at the URL.&nbsp;You&rsquo;ll see something like this:</p> <p><img alt="" class="animate-in lazy" data-alt="Example of three common query parameters used to name a search string: query, keyword, and s." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-1.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-1.jpg?Thumbnail" /></p> <p>If the word or letter your website uses to designate a search term is &ldquo;q,&rdquo; &ldquo;s,&rdquo; &ldquo;search,&rdquo; &ldquo;query,&rdquo;&nbsp;or &ldquo;keyword,&rdquo; you&rsquo;re in luck.&nbsp;Those are all covered by the default GA4 setting.</p> <p>If you have something different, like we do on the Northwoods website, you have to make an adjustment.&nbsp; The phrase that designates a search term on our website is &ldquo;Search_Keywords&rdquo;.</p> <p><img alt="" class="animate-in lazy" data-alt="Query parameter for search that is not a GA4 standard: Search_Keywords" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-2.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-2.jpg?Thumbnail" /></p> <p>If you don&rsquo;t have one of the default search terms, let&rsquo;s walk through how to make sure your search terms are being tracked.</p> <p>To do these steps, you will need &ldquo;Edit&rdquo; rights in your GA4 account.</p> <p>1. Go into the GA 4 Admin screen and click on the &ldquo;Data Streams&rdquo; option.</p> <p><img alt="" class="animate-in lazy" data-alt="GA4 Admin screen, with arrow pointing to Data Streams option" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-3.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-3.jpg?Thumbnail" /></p> <p>2. Click on the right arrow on your Web property.</p> <p><img alt="" class="animate-in lazy" data-alt="Choose the web property Data Stream in the GA4 Admin screen" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-4.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-4.jpg?Thumbnail" /></p> <p>3.&nbsp;In the &ldquo;Enhanced measurement&rdquo; window that opens up, click on &ldquo;Show advanced settings&rdquo; under Site search.</p> <p><img alt="" class="animate-in lazy" data-alt="Show Advanced Settings for Site search, in GA4 Admin" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-5.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-5.jpg?Thumbnail" /></p> <p>4.&nbsp;You can see the default search term parameters that already exist (in box 1). In box 2, type in the term or letter that your website uses to designate a search term. In Northwoods&rsquo; case, that&rsquo;s &ldquo;Search_Keywords.&quot;&nbsp;Then &ldquo;SAVE&rdquo; your work.</p> <p><img alt="" class="animate-in lazy" data-alt="Adding a new search query parameter to Site search, in the Admin Enhanced Measurement screen" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-6.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-6.jpg?Thumbnail" /></p> <p>5. That&#39;s it! From this point forward, any search terms entered onto the site by your users will be captured.</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="data_retention_settings">Tip 4: Check your &quot;Data Retention&quot; Settings</a></h2> <p>While you&rsquo;re in the GA 4 admin, go to &ldquo;Data Retention&rdquo; under the Data Settings Option.</p> <p>By default, the data retention is set to &quot;2 months.&quot;</p> <p><img alt="" class="animate-in lazy" data-alt="Default setting of two months for User and event data retention" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-7.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-7.jpg?Thumbnail" /></p> <p>You<em> probably</em> want to set that to the other option, 14 months.</p> <p><img alt="" class="animate-in lazy" data-alt="14-month setting for User and event data retention." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-8.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-8.jpg?Thumbnail" /></p> <p>There&#39;s much confusion over what this setting does.&nbsp; It has no impact on the standard aggregated reports in the UI - you&#39;ll be able to see information in those reports going back as long as you&#39;ve collected data.</p> <p>The setting does have an impact on the Explorations, though - if you are building your own set of reports, you won&#39;t be able to go back more than the 2 months or 14 months you specified.&nbsp; So it&#39;s a good idea&nbsp;to choose 14 months if you want any type of meaningful time-based Explorations.&nbsp;&nbsp;</p> <p>Also: Note the toggle for &ldquo;Reset user data on new activity.&quot;&nbsp;By default, that&rsquo;s on, which makes sense. It just means that regardless of which limit you choose (2 months&nbsp;or 14 months), each time a user comes to your website, the clock resets on when their data will be deleted.</p> <p><img alt="" class="animate-in lazy" data-alt="Toggle setting: Reset user data on new activity" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-9.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-9.jpg?Thumbnail" /></p> <p>Make sure to &quot;Save&quot; your changes!</p> <p>&nbsp;</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="create_custom_insights">Tip 5: Create Custom Insights</a></h2> <p>Here&rsquo;s the best tip so far &ndash; not only because some day it&rsquo;ll warn you about something catastrophic happening on your website, but because it&rsquo;s kind-of hidden.</p> <p>GA4 relies on machine-learning (ML) insights to supplement the stripped-down UI. Got something weird happening on your site? Ideally, an insight will report on that anomaly. But there are also some custom insights you&#39;ll want to enable.</p> <p>The insights are available in a couple of places, including on the home page&nbsp;(1). Go ahead and click on &ldquo;View all insights&rdquo; (2).</p> <p><img alt="" class="animate-in lazy" data-alt="View all insights on GA4 Home page" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-10.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-10.jpg?Thumbnail" /></p> <p>In the next page (home / insights), click on &quot;Create.&quot;</p> <p><img alt="" class="animate-in lazy" data-alt="Click on Create for new custom insights." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-11.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-11.jpg?Thumbnail" /></p> <p>You&rsquo;ll see a list of four &ldquo;custom insights,&quot;&nbsp;all four of which could be important (depending on your website). But one of them will be important for all&nbsp;websites &ndash; the &ldquo;Anomaly in daily views&rdquo; (1). Here&rsquo;s where you can set up a notification, which could be e-mailed&nbsp;to you, letting you know about anomalies in page views &ndash; e.g.&nbsp;you had zero page views today. I bet something&rsquo;s broken!</p> <p>Go ahead and click on the &ldquo;Review and create&rdquo; link (2).</p> <p><img alt="" class="animate-in lazy" data-alt="Create Custom Insight for Anomaly in daily views" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-12.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-12.jpg?Thumbnail" /></p> <p>Now you have a choice of specifying exactly what&nbsp;you want to be notified about. I can&rsquo;t tell you how happy this makes me. It&rsquo;s a wonderful practice to set up notifications when things are going wrong on your website. Most people don&rsquo;t do this (it&rsquo;s done through custom alerts in the older version of GA), but GA4 makes it very easy to set up. So easy, in fact, that I would accept the default of &ldquo;Has anomaly.&quot;&nbsp;I think GA4&rsquo;s ML will be able to figure this out just fine. I would for sure create the &ldquo;daily views&rdquo; custom insight; you can decide if it makes sense for your website to also enable the other custom insights.</p> <p>Even better &ndash; you can create your own custom insights from scratch.</p> <p>As small as these custom insights may seem, this is one of my favorite little features of GA4. I love proactively setting up alerts and it&rsquo;s so frickin&rsquo; easy to do here. Nicely done, GA4 team!</p> <p><img alt="" class="animate-in lazy" data-alt="Options for creating custom insights, based on daily percent changes, anomalies, etc." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-13.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-13.jpg?Thumbnail" /></p> <p>Specify the e-mails of the people you want notified:</p> <p><img alt="" class="animate-in lazy" data-alt="Send email notifications for GA4 custom insight." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-14.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-14.jpg?Thumbnail" /></p> <p>When you&rsquo;re all done, go ahead and press the &ldquo;Create&rdquo; button.</p> <p>When an anomaly happens, you&#39;ll get an e-mail like this one, which I got the day after I set up the hostname filters in <a href="#hostname_filter">tip 1</a>:</p> <p><img alt="" class="animate-in lazy" data-alt="Email notification: anomaly in daily users." data-src="/Northwoods-2020/Blogs/GA4-Setup-Anomaly-in-daily-users.jpg?Medium" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-Anomaly-in-daily-users.jpg?Thumbnail" /></p> <p>At some point in the future, when that&nbsp;anomaly fires and you&rsquo;re able to go in and resurrect your website tracking because something stupid broke &ndash; please send me an e-mail&nbsp;and thank me!</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="internal_traffic_filters">Tip 6: Create Filters for Internal Traffic (but don&#39;t make them live)</a></h2> <p>I know what you&rsquo;re doing &ndash; you&rsquo;re looking in the admin area to set up your filtered view, raw view, and test view.&nbsp; Right? Right?</p> <p>(How do I know? Because only well-trained GA nerds would be reading this far into this blog post.)</p> <p>Well, stop looking &ndash; there are no views and there&rsquo;s no way to set up those views.&nbsp;At least as of right now. (A Google webinar I&nbsp; attended recently said they would be coming at some point - so don&#39;t lose hope.)</p> <p>There are filters, though, which you can use for either internal traffic or dev/test environments.&nbsp;Let&rsquo;s walk through setting up an &ldquo;internal traffic&rdquo; filter.</p> <p>Start in the admin section of GA (1) and click on the &ldquo;Data Streams&rdquo; (2).</p> <p><img alt="" class="animate-in lazy" data-alt="GA4 Admin screen, with arrow pointing to Data Streams option" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-11A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-11A.jpg?Thumbnail" /></p> <p>Click on the web stream for which you&rsquo;ll create the filters:</p> <p><img alt="" class="animate-in lazy" data-alt="Choose the web property Data Stream in the GA4 Admin screen" data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-12A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-12A.jpg?Thumbnail" /></p> <p>Go to &quot;Tagging Settings&quot;:</p> <p><img alt="" class="animate-in lazy" data-alt="Choose the Tagging Settings from the Web stream details." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-13A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-13A.jpg?Thumbnail" /></p> <p>Click on &quot;Define Internal Traffic&quot;:</p> <p><img alt="" class="animate-in lazy" data-alt="Choose Define internal traffic from the More tagging settings window." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-14A.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-14A.jpg?Thumbnail" /></p> <p>Click on &quot;Create&quot;:</p> <p><img alt="" class="animate-in lazy" data-alt="Click on Create." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-15A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-15A.jpg?Thumbnail" /></p> <p>You&rsquo;ll now have your first opportunity to start adding an IP address (or multiple - up to 10 rows).&nbsp;Put in the name of the configuration (1), the match type (2), and the IP address (3).&nbsp;&nbsp;</p> <p><img alt="" class="animate-in lazy" data-alt="Internal Traffic Rule dialogue, where you can enter IP address(es)." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-16A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-16A.jpg?Thumbnail" /></p> <p>There are multiple match types, <em><strong>but no RegEx option</strong></em>(!!).&nbsp; I can&#39;t tell you how painful that omission is.</p> <p><img alt="" class="animate-in lazy" data-alt="The IP address match types include equal, begin with, etc. - but no RegEx option." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-17A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-17A.jpg?Thumbnail" /></p> <p>Here&rsquo;s a sample configuration filled out for my home IP address:</p> <p><img alt="" class="animate-in lazy" data-alt="Screenshot of filled-in internal traffic rule." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-18A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-18A.jpg?Thumbnail" /></p> <p>IMPORTANT: Even though GA4 uses &ldquo;Anonymize IP&rdquo; (dropping off the last octet in the IP address), for the &ldquo;IP Address equals&rdquo; option, you have to use the full IP address.</p> <p>Save your changes.&nbsp;You&rsquo;ll now see that configuration show up in your list of &ldquo;internal traffic&rdquo; rules.</p> <p><img alt="" class="animate-in lazy" data-alt="List of internal traffic rules, showing newly-created rule." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-19A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-19A.jpg?Thumbnail" /></p> <p>Next, go back to &ldquo;GA Admin / Data Settings / Data Filters&rdquo;.</p> <p><img alt="" class="animate-in lazy" data-alt="Choose Data Filters in the GA4 Admin screen." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-20A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-20A.jpg?Thumbnail" /></p> <p>Make sure the Data Filter for Internal Traffic is set up.&nbsp;(I think this happens by default; I don&rsquo;t think you have to do anything. But check to be sure.)</p> <p><img alt="" class="animate-in lazy" data-alt="Verify the Internal Traffic rule is in testing mode." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-21A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-21A.jpg?Thumbnail" /></p> <h3>Now What?</h3> <p>Now you wait patiently.&nbsp;You won&rsquo;t see any results of this filter until the next day.</p> <p>The next day, you can use the dimension &ldquo;<em><strong>Test data filter name</strong></em>&rdquo; to look for traffic that is labeled &ldquo;internal&rdquo; or &ldquo;not set&rdquo; (i.e. external).&nbsp;Here is an example of the filter:</p> <p><img alt="" class="animate-in lazy" data-alt="Test for internal traffic source in the GA4 Source/Medium screen." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-22A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-22A.jpg?Thumbnail" /></p> <p>And here&#39;s where you can use it in a report in the UI:</p> <p><img alt="" class="animate-in lazy" data-alt="Traffic Acquisition report, showing internal traffic source." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-23A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-23A.jpg?Thumbnail" /></p> <p>You could also use it in the Analysis Hub, as a dimension for any of the reports you build.&nbsp; As a simple example:</p> <ol> <li>Specify a date range which includes the internal-traffic being set up.</li> <li>If the dimension is not there, click the + button and add the&hellip;</li> <li>&ldquo;Test data filter name&rdquo; dimension.&nbsp;</li> <li>Choose an Exploration report.</li> <li>Drag or choose the &ldquo;Test data filter name&rdquo; to the &ldquo;Rows&rdquo; section.</li> <li>You&rsquo;ll now see the internal traffic and the not-set traffic.</li> </ol> <p><img alt="" class="animate-in lazy" data-alt="Screenshot of Analysis Hub report showing internal traffic as a report row." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-24A.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-24A.jpg?Thumbnail" /></p> <h4>Expect changes with the internal traffic filter</h4> <p>The IP filtering is so limited in GA4 compared to UA that I have to believe it&#39;ll be updated soon.&nbsp; The lack of RegEx in the match type is perhaps the biggest limitation right now - hard to see how to create an &quot;internal traffic&quot; channel for a large multi-site organization without having RegEx.&nbsp; Plus, of course, not having views available is painful. My personal opinion is that we&#39;ll see changes here in the near-term future.</p> <h3>Make the Internal Traffic Filter Live?</h3> <p>I think it&rsquo;s great to set up the internal traffic filter &ndash; but leave it in test mode.&nbsp;You can always do your analysis and exclude that segment, either in the GA4 interface or in Big Query.&nbsp;But since there is only one &ldquo;view&rdquo; in GA 4, I&rsquo;m reluctant to start excluding traffic that you&rsquo;ll never get back.&nbsp;<strong>Mess up that IP filter and the&nbsp;data is gone forever</strong> &ndash; there&rsquo;s no raw view on which to fall back.</p> <h4>But if you *really* want to make the internal-traffic filter live</h4> <p>Here&#39;s how.&nbsp;</p> <ol> <li>In the GA4 Admin screen, choose Data Settings / Data Filters</li> <li>Click on the three dots on the &quot;Internal Traffic&quot; line.</li> <li>Activate the Filter</li> </ol> <p><img alt="" class="animate-in lazy" data-alt="Activating the Internal Traffic Data Filter" data-src="/Northwoods-2020/Blogs/GA4-Data-Filter.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Data-Filter.jpg?Thumbnail" /></p> <p>You&#39;ll get a warning screen.&nbsp; Pay attention to it.&nbsp; Have you really tested the internal-traffic filter?&nbsp; Are you sure?&nbsp; if so, choose &quot;Activate filter&quot;.</p> <p><img alt="" class="animate-in lazy" data-alt="Activate Filter - are you sure?" data-src="/Northwoods-2020/Blogs/GA4-Activate-filter.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Activate-filter.jpg?Thumbnail" /></p> <p>You&#39;ll now see that the internal-traffic filter is active.</p> <p><img alt="" class="animate-in lazy" data-alt="Internal traffic filter activated." data-src="/Northwoods-2020/Blogs/GA4-Activated-internal-traffic-filter.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Activated-internal-traffic-filter.jpg?Thumbnail" /></p> <p>Again, my strong recommendation is NOT to make it active.&nbsp; Without a raw view to fall back on, it&#39;s too risky to start excluding traffic, particularly since you can easily filter out the internal traffic in the GA4 UI, in BigQuery, or&nbsp; in Google Data Studio.</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="label_exploration_reports">Tip 7: Label Your Exploration Reports</a></h2> <p>Here&rsquo;s a simple idea &ndash; make sure that every report you create in Explorations has a name.</p> <p><img alt="" class="animate-in lazy" data-alt="Screenshot of a report name in Exploration." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-25A.jpg?Medium" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-25A.jpg?Thumbnail" /></p> <p>Otherwise, once you start creating reports, you&rsquo;ll be hard pressed to remember what&rsquo;s in the myriad &ldquo;Untitled exploration&rdquo; reports.</p> <p><img alt="" class="animate-in lazy" data-alt="List of previously-saved reports in Explorations, many of which are named Untitled exploration." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-26A.jpg?BlogBannerN" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-26A.jpg?Thumbnail" /></p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="setup_biqquery_integration">Tip 8: Set up BigQuery Integration</a></h2> <p>Honestly one of the most impressive features of GA4 is its built-in integration with BigQuery (part of the Google Cloud Platform). You can set up automatic export of GA4 data directly into BigQuery and specify whether you want to do that once per day, or virtually instantaneous. The &ldquo;once per day&rdquo; option is, essentially, going to be free (depending on how much data you have). For the &ldquo;instantaneous&rdquo; exports, you&rsquo;ll have to set up a billing account.</p> <p>I won&rsquo;t try to recreate the excellent blog post that <a href="https://www.charlesfarina.com/new-bigquery-integration-for-app-web-properties/" linktype="3" target="_blank">Charles Farina</a> wrote on setting up BigQuery &ndash; go ahead and follow his steps and in about a day you&rsquo;ll start getting data like this, which clearly shows the event / parameters structure of GA4:</p> <p><img alt="" class="animate-in lazy" data-alt="GA4 pageview event and associated parameters, in a BigQuery table." data-src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-19.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-4-Set-Up-Tips-19.jpg?Thumbnail" /></p> <p>Why should you care?&nbsp;Ultimately, I suspect much of the GA4 analysis is going to be done based on the data that&rsquo;s stored in Big Query. Once the data is&nbsp;in BigQuery, you have a whole new world of processing and analysis open to you &ndash; much more than you&rsquo;ll have within GA4 itself.</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="leave_ua_in_place">Tip 9: Leave Your Universal Analytics (the &quot;Old&quot; GA) in Place</a></h2> <p>The hostname and IP filters are two of many reasons why I think GA4 should run alongside the older version of GA.&nbsp;</p> <p>The GA4 UI (user interface) is totally different. It will take some time for all the analysts who worked with the older version &ndash; myself included - to truly &ldquo;grok&rdquo; the newer version. But by comparing the new to the old, you can understand and dig into the differences.&nbsp;</p> <p>When you&nbsp;compare GA4 to Universal Analytics (UA), use the &quot;raw&quot; or unfiltered view in UA (assuming you&rsquo;ve set that up).&nbsp;The raw view will be the closest to what you&rsquo;ll see in GA4, because the filtering capabilities are still so limited in GA4.</p> <p>Thankfully, it&#39;s very easy to dual-tag your site and run both Universal Analytics and GA4.&nbsp; You&#39;ll do yourself a favor by running both.</p> <p><a href="#content_index">(back to index)</a></p> <h2><a name="expand_scroll_tracking">Tip 10: Expand the automatic scroll tracking</a></h2> <p>One of the enhanced measurements set up by default in GA4 is scroll tracking.&nbsp; It&rsquo;s loaded on every page and fires when the visitor gets 90% of the way down the page.</p> <p>This approach is smart.</p> <p>Universal Analytics&#39; scroll depth not as smart.&nbsp; It&#39;s usually&nbsp;set&nbsp;to track at the 10, 25, 50, and 75% marks &ndash; which means A LOT of noise gets sent to GA.&nbsp; When you set it up that way, scroll-depth tracking is usually the #1 event, by far, in GA.&nbsp;</p> <p><img alt="" class="animate-in lazy" data-alt="Scroll tracking representing 69% of all event categories." data-src="/Northwoods-2020/Blogs/GA-tip-9.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA-tip-9.jpg?Thumbnail" /></p> <p>That&rsquo;s a lot of data and very little information.</p> <p>GA4&rsquo;s approach, by contrast, is a nice attempt to capture meaningful data and not inundate with noise. &nbsp;</p> <p>Sometimes, though, you&rsquo;ll want to track scroll depth at more than just the 90% mark &ndash; e.g. for blogs or other long-form content. Personally, I like&nbsp;to track those at the 25, 50, and 75% marks.</p> <p>There&rsquo;s good news!&nbsp; If you already have scroll-depth-tracking&nbsp;set up in GTM for your UA implementation, it&rsquo;s easy to adjust to GA4.</p> <p>Note: if you&rsquo;re interested in this tip, I&rsquo;m going to assume you already have scroll-depth&nbsp;set up in GTM.&nbsp; If you haven&rsquo;t set it up yet, you have two options:</p> <ul> <li><a href="https://www.analyticsmania.com/google-tag-manager-recipes/scroll-tracking/" linktype="3" target="_blank">Download a&nbsp;container file</a>&nbsp;with scroll-depth tracking&nbsp;already set up. (This is just one of the many excellent resources&nbsp;from Julius Fedorivicius at analyticsmania.com.)</li> <li><a href="https://www.seerinteractive.com/blog/how-to-track-scroll-depth-element-visibility-in-gtm/" linktype="3" target="_blank">Learn</a> how to do it yourself&nbsp;(courtesy of the fine folks at seerinteractive.com)</li> </ul> <h3>Steps to add more Scroll Tracking in GA4, Using GTM.</h3> <p>Note: I&rsquo;m going to assume you have some familiarity with Google Tag Manager (GTM), so I&rsquo;m going to highlight the most important steps you&rsquo;ll need to take along the way.&nbsp; The missing steps (like &ldquo;Click on &lsquo;New&rsquo; to create a new tag.&rdquo;) will be familiar to most people who have worked in GTM a bit.&nbsp; Please feel free to reach out to me if you&rsquo;d like further clarification, though.</p> <p>1. In GTM, you&rsquo;ll need the &ldquo;Scroll Depth Threshold&rdquo; and &ldquo;Scroll Depth Units&rdquo; enabled in the built-in variables section. (Your container may also have &ldquo;Scroll Direction&rdquo; enabled.)</p> <p><img alt="" class="animate-in lazy" data-alt="GTM built-in variables - Scroll Depth Threshold and Units." data-src="/Northwoods-2020/Blogs/GA-tip-9-2.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA-tip-9-2.jpg?Thumbnail" /></p> <p>2. You&rsquo;ll need a scroll-depth trigger.&nbsp; Two important notes:</p> <ul> <li> <p>You can set the percentages to whatever you want.&nbsp; In this case, the percentages of 25, 50, 75, and 100% ill end up getting added to the 90% built-in GA4 scroll tracking.</p> </li> <li> <p>I recommend only firing the trigger on certain sections of your site (the &ldquo;/blog&rdquo; pages in this example).</p> </li> </ul> <p><img alt="" class="animate-in lazy" data-alt="GTM scroll depth trigger." data-src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9c.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9c.jpg?Thumbnail" /></p> <p>3. Create a new tag of type &ldquo;GA4 Event&rdquo;.</p> <p><img alt="" class="animate-in lazy" data-alt="GTM tag type of GA4 Event." data-src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9d.jpg" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9d.jpg?Thumbnail" /></p> <p>4. With this new tag (see screenshot for steps):</p> <ol> <li>Name it however you&rsquo;d like.</li> <li>Use the name of the GA4 configuration tag you&rsquo;ve previously set up in GTM.</li> <li>Make sure to use &ldquo;scroll&rdquo; as the event name.&nbsp; &ldquo;scroll&rdquo; is the GA4-recognized event name for the scroll-depth tracking; if you use any other name, set up is going to be harder.</li> <li>Add event parameter and use &ldquo;percent_scrolled&rdquo; for the Parameter Name.&nbsp; Again, you want to be consistent with what GA4 uses for scroll events.</li> <li>Use one of the variables you configured in step 1, above - &ldquo;{{Scroll Depth Threshold}}&rdquo;.</li> <li>Finally, use the trigger you set up in step 2, above.</li> </ol> <p><img alt="" class="animate-in lazy" data-alt="GA4 Event tag in GTM showing scroll event and parameters." data-src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9f.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9f.jpg?Thumbnail" /></p> <p>5. Save the tag and then go into GTM Preview mode.</p> <p>6. You can either look at the events in GTM&rsquo;s Preview tab, or in GA4&rsquo;s Debug View. &nbsp;I&rsquo;ll show the latter.</p> <p>7. Go to the DebugView in GA4 (&ldquo;A&rdquo; in screenshot below).&nbsp; On your website, go to one of the pages where you set up the extra scroll tracking (e.g. the /blog pages, in my example.)&nbsp; Scroll down the page.&nbsp; You&rsquo;ll see the scroll events show up in the DebugView (&ldquo;B&rdquo; in screenshot).</p> <p><img alt="" class="animate-in lazy" data-alt="DebugView with four scroll events highlighted." data-src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9g.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9g.jpg?Thumbnail" /></p> <p>8. Click on one of the &ldquo;scroll&rdquo; events so you can see the parameters.&nbsp; You should see &ldquo;percent_scrolled&rdquo;, if you set it up correctly&nbsp;in your GTM tag, along with the value (75% in the screenshot below).</p> <p><img alt="" class="animate-in lazy" data-alt="Scroll event with 75 percent_scrolled parameter" data-src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9h.jpg?Large" loading="lazy" src="/Northwoods-2020/Blogs/GA4-Setup-Tips-9h.jpg?Thumbnail" /></p> <p>9. That&rsquo;s it!&nbsp; You&rsquo;ve now added supplementary scroll tracking in GA4 to a specific set of your pages.&nbsp; Nice job!</p> <p>10. Assuming it&rsquo;s all working right, go ahead and publish your GTM container.&nbsp;</p> <p><a href="#content_index">(back to index)</a></p> <p><em>Looking for more GA4 tips? Check out our <a href="/GA4Hub" linktype="2" target="_self">GA4 Resource Hub</a>!</em></p>
/Northwoods-2020/Hero-Images/Hiker-Looking-Out-Over-Mountains.pngHiker Looking Out Over MountainsGA4 is easy to set up and even a plain-vanilla installation offers great insights.  However, take these extra steps to ensure you’re maximizing the GA4 setup for *your* website. #GA4 #analytics #northwoodsFred Pike/Northwoods-2020/People/Fred-Pike.jpg?ThumbnailMan standing in front of log cabin backgroundFred Pikehttps://ctt.ac/Gsd6i<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script><script>hbspt.forms.create({ region: "na1", portalId: "23630176", formId: "40c5bbae-05a2-42ea-94dd-1662181fd56e" });</script>/Northwoods-2020/Blogs/Social-Media-Cards/Social-Card-Blog-GA-4-Set-Up-Tips.png?LargeGA4 Setup Tips2020-10-21T00:00:00A list of setup tips for Google Analytics 4 (GA4). Tips cover filters for both hostname and internal traffic; creating custom insights to warn you of low traffic and other anomalies; setting up tracking of search terms entered on your site, etc.3620311/People/Fred-PikeFredPikeManaging Director & GA/GTM Practice Lead<p>Fred Pike is Northwoods&#39; resident analytics guru and a world-renowned expert in Google Analytics and Google Tag Manager. A sought-after speaker and educator, he has led courses at industry-leading conferences, events, and organizations including Conversion XL, MeasureSummit, and SuperWeek. Fred is passionate about finding the best ways to drive website traffic and understanding user interactions. He is also an accomplished pit musician and proud owner of beloved Pekingese Xuxa, one of Northwoods&rsquo; most frequent furry visitors.</p>Fred Pike/Northwoods-2020/People/Fred-Pike.jpgFred PikeAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesPackage Type - NWS Data ModulesPersonID - NWS Data ModulesFred PikeProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesSkillLevel - NWS Data ModulesTopic - NWS Data ModulesVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data ModulesTeamAll StaffLeadershipAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesPackage Type - NWS Data ModulesPersonID - NWS Data ModulesFred PikeProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesNWS DigitalSkillLevel - NWS Data ModulesTopic - NWS Data ModulesData & AnalyticsDigital MarketingVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data Modules02024-02-20T12:33:08.06300