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.

Provide link in Analytics settings panel to update GA4 configuration and improve UI for related UA link

See original GitHub issue

In the Analytics settings panel (in view-only state), there is currently a long message with a link that points to the Analytics frontend for the currently active Analytics property and its view.

Now that users can also have a GA4 property configured there, this message is confusing, as it appears below all of those settings while still only focusing on UA. We will now need two links instead of just the one. In addition, it’s a bit strange to have a long sentence as a complete link anyway. Let’s revisit this UI.

Screenshot: Screen Shot 2021-07-13 at 9 55 56 AM

A potential solution would be:

  • Display a small “Edit (Universal Analytics configuration) in Analytics” external link for the UA property on the right of the three UA values.
  • Display a similar small “Edit (Google Analytics 4 configuration) in Analytics” external link for the GA4 property on the right of the two UA values.

cc @Pratheep-lab


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

Acceptance criteria

In the Analytics settings view:

  • Remove the link “You can make changes to this view…” and instead place a short link (with external indicator) to the same URL on the right side of the “View” value.
    • It should link to https://analytics.google.com/analytics/web/?authuser={googleEmailAddress}#/a{accountID}w{uaPropertyID}p{viewID}/admin/view/settings (same as the previous “You can make changes to this view…” link)
    • It should say “Edit in Analytics”
    • For screen readers, it should be more specific: “Edit Universal Analytics configuration in Analytics”
  • If a GA4 property is also connected, display a similar link on the right side of the “Measurement ID” value:
    • It should link to https://analytics.google.com/analytics/web/?authuser={googleEmailAddress}#/a{accountID}p{ga4PropertyID}/admin/streams/table/{webDataStreamID}
    • It should say “Edit in Analytics”
    • For screen readers, it should be more specific: “Edit Google Analytics 4 configuration in Analytics”
  • The links should both appear in the same vertical position and with the same font-size as the individual setting values (i.e. the IDs that display right under all the labels).
  • The changes should be available/previewable in Storybook.

Implementation Brief

Using assets/js/modules/analytics/components/settings/SettingsView.js

In order to build the GA4 Url

  • Get the webDataStreamID from select( MODULES_ANALYTICS_4 ).getWebDataStreamID()

  • Build the Url like editViewSettingsURL but with the same Url structure as the AC (passing this into getServiceURL)

  • Update the text for the existing UA link as per the AC

These links should be encoded with escapeURI (requires updating existing UA link)

  • Move this link up into the same div .googlesitekit-settings-module__meta-items as containing the UA info
  • Create a new link similar to this and add it to the end of the same div as the .googlesitekit-settings-module__meta-items of the GA4 info
  • Use the new GA4 link here
  • Set the text for this GA4 link as per the AC

In order to line up the text for both these links

  • add empty <h5>s at the top of each Link’s googlesitekit-settings-module__meta-item (just containing a &nbsp;).
  • these <h5>s should be hidden on mobile

To style the Links to be the same size as the rest of the text

  • add a new class .googlesitekit-settings-module__inline-link to the Links (through the prop className)
  • Add a new rule to assets/sass/components/settings/_googlesitekit-settings-module.scss
.googlesitekit-settings-module__inline-link {
    font-size: 1rem;
}

Test Coverage

  • There should be no changes to existing tests

Visual Regression Changes

  • There should be no changes to existing VRTs

QA Brief

  • Connect Site Kit to an Analytics account that has a GA4 and a UA property
  • Go to Analytics Settings page
  • Observe new changes with new links as per AC

Changelog entry

  • Add and update deep links on Analytics settings view to edit the UA property view and GA4 measurement ID.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
eugene-manuilovcommented, Aug 16, 2021

@felixarntz do you mind reviewing #3874?

1reaction
felixarntzcommented, Aug 13, 2021

@wpdarren @danielgent @eugene-manuilov @aaemnnosttv Let’s try to fix it before the release on Monday, but without any hacks please 😃

We may need to ensure the line height is the same despite the smaller font size? Alternatively, let’s change the font size back to what it originally was (i.e. remove the --tiny class) - although I like the current version where the link is not that huge.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a Google Analytics 4 property (to a site that already has ...
In the Property column, click GA4 Setup Assistant. It's the first option in the Property column. Click Get started under I want to...
Read more >
How to Setup and Install Google Analytics 4 with Google Tag ...
Here's the process of how to install Google Analytics 4 with Google Tag Manager: Create a new GA4 property; Create a data stream...
Read more >
How to Upgrade to Google Analytics 4 - Complete Guide
This is a guide on how to upgrade to Google Analytics 4. Learn how to install and implement GA4 to get started on...
Read more >
NEW GA4 (Google Analytics 4) Update – Configure ... - YouTube
In this Insiders Update, you will walk-through the changes to the configuration options in GA4 (Google Analytics 4).
Read more >
Google Analytics
Not your computer? Use Guest mode to sign in privately. Learn more. Next. Create account. English (United States). Afrikaans; azərbaycan; bosanski; català ...
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