question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't display the blue notice bar until a user selects either a GA4 or UA property when connecting Analytics.

See original GitHub issue

When setting up Analytics and selecting an account which has both a UA and GA4 property don’t display the blue notice bar regarding the creation of an additional property until a user makes a selection.

This would lead to less confusion considering the notice bar that appears on account selection assumes the user will select a UA property.

2021-06-22-14-03-27

Screenshot of the current blue bar that appears upon selecting an Analytics account with both a UA and GA4 property.

image

The blue notice assumes a user will select a UA property. If the user selects a GA4 property the notice does change, which is ideal however an improvement would be to only display that notice when a property selection has been made.

image

Steps to reproduce

  1. Setup Site Kit
  2. Connect Analytics
  3. Select an account that has both a UA and GA4 property
  4. The blue notice bar appears before the user makes a property selection, assuming they will select a UA property.

Screenshots

Additional Context

  • PHP Version:
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Plugin Version [e.g. 22]
  • Device: [e.g. iPhone6]

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • In the Analytics setup flow (with ga4Setup flag active), any of the three new blue notices around the associated other property (whether about creating a new one or selecting a matching one) should only appear when a property is already selected in the primary dropdown.
    • In other words, if no account/property is selected or if only an account has been selected, the notice should not be visible yet.

Implementation Brief

  • Update the SetupFormUA component:
    • Pull UA propertyID using the getPropertyID selector
    • Update the shouldShowGA4PropertyNotice constant to also check if the propertyID is not empty.
  • Update the SetupFormGA4 component:
    • Pull GA4 propertyID using the getPropertyID selector
    • Update the GA4PropertyNotice element to render it only when the propertyID is not empty.
  • Update the SetupFormGA4Transitional component:
    • Pull GA4 propertyID using the getPropertyID selector of the analytics-4 module
    • Update the GA4PropertyNotice element to render it only when either UA or GA4 propertyID is not empty.

Test Coverage

  • N/A

Visual Regression Changes

  • N/A

QA Brief

  • Setup Site Kit
  • Connect Analytics using an account with a bunch of properties but none that matches the current site URL
  • Check that the blue notice bar for the GA4 property does not appear before the user makes a property selection

Changelog entry

  • Show information notice about associated UA / GA4 property only once a property has been selected.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
felixarntzcommented, Jul 7, 2021

@tofumatt @Hazlitte It is not entirely correct that the selection cannot be empty. property_create is a different value from '', which is the initial state, and that specifically is what we need to cater for here. If the value is property_create, a selection has been made, so here the notice still needs to be shown. It should only not be shown if the property selection is ''.

The reason it can be tricky to get to that state is that you’ll need to have an account with a bunch of properties but none that matches your current site URL. If you do, Site Kit will pre-select that, and you can never manually get to unselect the property. The easiest way to actually preview the situation that needs to be checked here is to modify the datastore manually via the browser console, e.g. googlesitekit.data.dispatch('modules/analytics').setPropertyID('').

0reactions
wpdarrencommented, Jul 15, 2021

QA Update: Pass ✅

  • Verified that within Analytics set up flow, that when you select an account with lots of properties not linked with the URL of the test site, that the blue notice no longer appears.
  • Verified that only when you select a property does the appropriate blue notice appear.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

[UA→GA4] How to check whether you have Universal ...
If you are using Universal Analytics, you'll see a blue notification at the top that says "Universal Analytics will no longer process new...
Read more >
Track Events with Google Analytics 4 (GA4) and Google Tag ...
In this guide, you will learn how to track events with Google Analytics 4 and Google Tag Manager. Also, you can watch a...
Read more >
How to Use Google Analytics 4 for Your Business | Vine Digital
Type your website into the address bar provided and hit “Connect.” ga. Your website will open in a new window; you'll get a...
Read more >
Step-by-Step Guide: Setting Up New Analytics 4 Property
Creating the GA4 Property in Google Analytics. Go to your Google Analytics Dashboard and click on the gear icon or settings in the...
Read more >
Google Analytics 4: What You Need to Know - Grow My Ads
As of right now, GA4 does not list specific websites. They'll show you instead categories of where your traffic is coming from. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found