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.

Scaffold GA4 Activation Banner "happy path" UI

See original GitHub issue

Feature Description

Create stubs for the Controller Component and each of the top-level presentational components:

  • Reminder Component.
  • Setup Component.
  • Success Component.

Prepare the basic local state and logic for stepping through these components, i.e. press the Reminder Component CTA to show the Setup Component, and the Setup Component CTA to show the Success Component.

Use a regular Button on the Setup Component, this can be swapped out for the Button with Spinner when it’s ready.

Render the component at the top of the Dashboard when the ga4ActivationBanner feature flag is enabled.


Acceptance criteria

  • The GA4 Activation Banner should be scaffolded and displayed on the Dashboard when the ga4ActivationBanner feature flag is enabled.
  • Stubs should be created for each top-level component:
    • Reminder Component.
    • Setup Component.
    • Success Component.
  • Only one of these components will be shown at a time and they will be stepped through in the order listed, with the Reminder Component being displayed first.
  • Each component should display some placeholder text which will be replaced in subsequent issues.
  • The Reminder and Setup components should each display a standard button. Pressing a button should advance to the next stage.

Implementation Brief

  • In assets/js/modules/analytics-4/components, create a new folder - dashboard and another folder ActivationBanner inside of it.
  • Within assets/js/modules/analytics-4/components/dashboard/ActivationBanner, create a new functional component ActivationBanner (index.js).
  • Create 3 additional functional components: ReminderBanner, SetupBanner and SuccessBanner. Each of these should:
    • Render the BannerNotification component with the following props:
      • id = ga4-activation-banner
      • title and ctaLabel = could simply be placeholder text or use the Figma designs for the eventual titles and CTA button that each component will display.
      • onCTAClick should be the setStep method prop passed down in the next step from ActivationBanner.
  • Within ActivationBanner, use a local state variable, say step to render one of the above three components. Pass the setStep method down to Reminder and Setup so they can change step to the next step.
  • Within BannerNotifications:
    • After the ZeroDataStateNotifications, render ActivationBanner if the ga4ActivationBanner flag is enabled.
  • Add a StoryBook v6 story for the ActivationBanner component (with all three steps).

Test Coverage

  • No new tests needed.

QA Brief

  • WIth the ga4ActivationBanner flag enabled, verify the new banner appears and can be stepped through as in the ACs.
  • Verify the new storybook story as well under Modules/Analytics4.
  • To retest the banner, clear the Application / Browser storage and refresh the dashboard/storybook story.

Changelog entry

  • N/A

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
techanvilcommented, Jul 27, 2022

Hey @jimmymadon, the IB is looking good. I do have a suggestion regarding the main folder/component name.

Taking a look at our existing folder structure, the suggested components/activation-banner would be slightly out of keeping with existing conventions.

To illustrate here’s the output of find $( find assets/js/modules -name components ) -type d:

assets/js/modules/tagmanager/components
assets/js/modules/tagmanager/components/setup
assets/js/modules/tagmanager/components/common
assets/js/modules/tagmanager/components/settings
assets/js/modules/pagespeed-insights/components
assets/js/modules/pagespeed-insights/components/settings
assets/js/modules/pagespeed-insights/components/dashboard
assets/js/modules/pagespeed-insights/components/common
assets/js/modules/analytics/components
assets/js/modules/analytics/components/common
assets/js/modules/analytics/components/common/AccountCreate
assets/js/modules/analytics/components/settings
assets/js/modules/analytics/components/dashboard
assets/js/modules/analytics/components/dashboard/DashboardAllTrafficWidget
assets/js/modules/analytics/components/setup
assets/js/modules/analytics/components/module
assets/js/modules/analytics/components/module/ModulePopularPagesWidget
assets/js/modules/idea-hub/components
assets/js/modules/idea-hub/components/settings
assets/js/modules/idea-hub/components/common
assets/js/modules/idea-hub/components/setup
assets/js/modules/idea-hub/components/dashboard
assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget
assets/js/modules/analytics-4/components
assets/js/modules/analytics-4/components/settings
assets/js/modules/analytics-4/components/setup
assets/js/modules/analytics-4/components/common
assets/js/modules/adsense/components
assets/js/modules/adsense/components/module
assets/js/modules/adsense/components/module/ModuleOverviewWidget
assets/js/modules/adsense/components/settings
assets/js/modules/adsense/components/dashboard
assets/js/modules/adsense/components/common
assets/js/modules/adsense/components/common/AdSenseConnectCTA
assets/js/modules/adsense/components/setup
assets/js/modules/adsense/components/setup/v2
assets/js/modules/adsense/components/setup/v2/common
assets/js/modules/adsense/components/setup/v2/SetupAccountSite
assets/js/modules/optimize/components
assets/js/modules/optimize/components/settings
assets/js/modules/optimize/components/setup
assets/js/modules/optimize/components/common
assets/js/modules/thank-with-google/components
assets/js/modules/thank-with-google/components/settings
assets/js/modules/thank-with-google/components/common
assets/js/modules/thank-with-google/components/setup
assets/js/modules/search-console/components
assets/js/modules/search-console/components/settings
assets/js/modules/search-console/components/dashboard
assets/js/modules/search-console/components/dashboard/SearchFunnelWidget
assets/js/modules/search-console/components/common

Bearing in mind the banner is only going to be displayed on the dashboard, I think it would be appropriate to place it under assets/js/modules/analytics-4/components/dashboard (can always move to common if it becomes shared). Also consider how the component will be imported - we should stick with the camel case name for the folder, and I don’t think we need the Main suffix. With all this in mind I’d suggest simply calling the component ActivationBanner, sitting in assets/js/modules/analytics-4/components/dashboard/ActivationBanner/index.js.

Please see what you think. Other than that, this looks good to go! 😃

0reactions
wpdarrencommented, Aug 10, 2022

QA Update: ✅

Verified:

  • The GA4 Activation Banner is displayed on the Dashboard when the ga4ActivationBanner feature flag is enabled. Stubs should be created for each top-level component:

    • Reminder Component.
    • Setup Component.
    • Success Component.
  • Only one of these components is shown at a time and they are step through in the order listed, with the Reminder Component being displayed first.

  • Each component displays placeholder text.

  • The Reminder and Setup components each display a standard button. Pressing a button takes me to the next stage.

  • Verified the new storybook story under Modules/Analytics4.

Screenshots

image image image

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GA4] Path exploration - Analytics Help - Google Support
Explore your user journeys in a tree graph.The path exploration techniques lets you do things like: Find the top pages that new users...
Read more >
Untitled
Art modell sells ravens, Scrum retrospective examples, Kahulanui video, Muerto de amor lorca analisis, Cute little quotes about happiness.
Read more >
Untitled
Jefferson hotel dc room service menu, My asana rose bay, Path of exile ... 238 penquite road norwood, Iu basketball mini banners, Jean...
Read more >
Untitled
Dallas tx six flags? Daulat movie songs mp3, Initial d kai kogashiwa, Movido sinonimo, Masonry js angular! Stassi schroeder fashion blog, Imtiyaz karbelkar, ......
Read more >
Untitled
Quiz to determine career path, Pocketbook 360 apps, Aurelio cheveroni yo soy el lobo feroz, Waypoint group atlanta, High on a wire lyrics...
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