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.

For 'View Only dashboard' – CTAs that shared users can't use should not appear

See original GitHub issue

Bug Description

CTAs in the dashboard that are intended for admins, without any useful info or actionable links/items when viewed in a shared context, should not be shown to “shared”/view-only Dashboard users.

Instead, we should show a different CTA informing the user that the admin needs to take steps before the module will be useable. Alternatively, we could show the user nothing as there is currently nothing really to show.

Bug bash issue: https://app.asana.com/0/1202258919887896/1202419867342280 please refer to Asana issue for background

Steps to reproduce

  1. Connect AdSense module and enable AdSense module sharing in Site Kit.
  2. Ensure AdSense property is in a state that would cause a CTA to appear for the admin user
  3. Sign in as a “shared dashboard” user
  4. See the CTA intended for the admin

Screenshots

image.png


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

Acceptance criteria

  • The AdSenseLinkCTA component should not be shown in a view-only context

Implementation Brief

  • In assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidget.js:
  • Using the useViewOnly hook, return the WidgetNull component if the user has view-only access AND Adsense isn’t linked.

Test Coverage

  • In stories/module-adsense-components.stories.js, add a story to render the AdSenseLinkCTA component if it isn’t view-only context AND Adsense isn’t linked.

QA Brief

  • Start off with AdSense in a state that would cause the “Link Analytics and AdSense” CTA to appear for the admin user
  • Sign in with a user with permissions to view the module
  • The “Link Analytics and AdSense” CTA should not show up for user with view only access.

Changelog entry

  • Don’t show the “Link Analytics and AdSense” CTA on the view-only Dashboard.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tofumattcommented, Jun 22, 2022

The IB here will show a zero/gathering data state for users instead of the “Link AdSense and Analytics” CTA. Given the discussion above, I think it would be better to show nothing for AdSense + Analytics not being linked when a view-only user views AdSense widgets.

I think rendering nothing instead of the output here: https://github.com/google/site-kit-wp/blob/7fe9ecfc60ca934b698d229a68f8e59a1eab9658/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidget.js#L197-L206 would be better in a view-only context if AdSense and Analytics aren’t linked…

Otherwise the above render will likely happen with the IB suggested, and that means view-only users will ALWAYS see this widget in a zero/gathering data state even though we’ll never gather data for it since it isn’t setup.

Let’s hide it entirely instead on a view-only dashboard.

1reaction
aaemnnosttvcommented, Jun 21, 2022

@felixarntz the problem with showing the existing DashboardZeroData component is more about the site steps that we can’t show for view-only users. These use deep links into the service that we can’t build (due to lack of settings) but also because we shouldn’t expect view-only users to be able to action them just like with other CTAs. I think we can simply make this part of the component conditional.

Edit: nevermind, I missed the part of your comment about doing away with this custom zero data state 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to view shared dashboard - Support Central!
I shared the Dashboard with a user. When I proxy in as them, this Dashboard does not appear. Why can't the user see...
Read more >
Not able to view dashboard shared with me. - ServiceNow
Solved: When i try to view the report dashboard it says "Report visible only to a specific users of group. All other members...
Read more >
Analyze your button calls-to-action (CTA) performance
On the Calls-to-action dashboard, you can find a list of your button CTAs. Filter your CTAs by using the dropdown menus above the...
Read more >
7 Common Pitfalls of Call to Action Design - VWO Blog
If the user can't read it, the page won't be useful. They'll bounce off and you will lose your chances even before the...
Read more >
3 CTA Types That Actually Work - Neil Patel
Always strive for a compelling offer that jumps out at users. Start by giving a compelling statement or headline in the first box....
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