Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PNI] Make external links open in a new tab #7878

Closed
kristinashu opened this issue Nov 16, 2021 · 9 comments
Closed

[PNI] Make external links open in a new tab #7878

kristinashu opened this issue Nov 16, 2021 · 9 comments
Assignees
Labels
buyer's guide 🛍 Issues related to the buyer's guide engineering

Comments

@kristinashu
Copy link

PNI now links out to a lot of external links and we don't want to loose people because of that. Let's make external links open in a new tab rather than in the same one.

@kristinashu kristinashu added engineering buyer's guide 🛍 Issues related to the buyer's guide labels Nov 16, 2021
@jamilasnell
Copy link

This may be an accessibility issue. Do we have metrics that support us making external links open in a new tab? @kristinashu

@mattcfilbert
Copy link
Contributor

mattcfilbert commented Nov 23, 2021

Definitely worth getting metrics. But if they support @kristinashu's suggestion then it is acceptable to open a link in a new tab, accessibility-wise.

While it can be disorienting without proper notification, it is already an established precedent in the Foundation site and does not constitute an accessibility failure. (Especially if we are following guidelines to notify users of the new tab opening.)

We should be adding "rel= noopener noreferrer" either manually or via JS to each link that opens in a new tab (for security reasons) in addition to warning users who depend on screen readers (e.g. via aria-label).

@mattcfilbert
Copy link
Contributor

PS - @kristinashu to clarify, other than the product privacy section and the contest, it looks like the bulk of the external links are in the text of the Buyers Guide (and therefore should be editing of input data rather than anything hard coded). Was that your understanding as well?

@kristinashu
Copy link
Author

@jamilasnell what type of metrics are you looking for? The hypothesis that Ben, Anna, and I had is that with the addition of so many new external links in the guide, our bounce rate will look higher because people will click on them and be navigated away from the site.

I looked at the bounce rate for the 7 days after launch last year 44.72% and then compared this to the last 7 days from this year's launch 51.91%. I would consider this increase in bounce rate as confirming our hypothesis. The interesting thing is that the session duration is exactly the same for this 7 day period. I interpret this to mean that people are more engaged with the content and if links were to open in a new tab that our bounce rate would actually decrease this year.

Thank you @mattcfilbert for your input and for sharing those resources. I'd love to hear input for everyone.

@Pomax
Copy link
Contributor

Pomax commented Nov 25, 2021

we can run with _blank targets and see if that increases engagement, If it doesn't though, I'd rather take them back out so that users can decide how to open links rather than our code forcing that issue (here, and any other place we are apparently using blank targets). I've landed the PR, so once that makes it to prod, we can start keeping an eye on the metrics.

@kristinashu
Copy link
Author

Thank you Pomax! I like the idea of doing this just as a test and not committing to it. I'll keep an eye on the analytics but have also added a reminder in my calendar to check them on Dec 7.

@kristinashu
Copy link
Author

Thank you for the PR on this. It looks like now a lot of the external links are opening in new tabs, however not all of them are.

Is it possible to make links in the rich text fields open in an external window as well?

For metrics so far, it seems like the links are already helping. I compared both our last 7 days vs the same 7 day period last year which showed improvements for both bounce rate and session duration. I did this since there is always a worse bounce rate and session duration later after launch. I did also pulled numbers to compare the dips and both look like there were improvements from this year over last.

2020 at launch

  • bounce rate 44.72%
  • session duration 2m 8s

2020 after launch

  • bounce rate 51.91%
  • session duration 1m 17s

Differences for 2020

  • bounce rate 7.19%
  • session duration -51 s

2021 at launch

  • bounce rate 65.04%
  • session duration 2m 8s

2021 after launch

  • bounce rate 59.96%
  • session duration of 1m 48s

Differences for 2021

  • bounce rate 5.08%
  • session duration of -20s

@Pomax
Copy link
Contributor

Pomax commented Dec 9, 2021

If we want universal new-tab link behaviour from the rich text streamfield component, we should file a separate issue for that, as that would affect every page in the CMS and will require some wagtail investigating.

And then it sounds like we can close this issue as "this had a positive effect"?

@kristinashu
Copy link
Author

I've opened a new ticket for this #8002 and will close this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buyer's guide 🛍 Issues related to the buyer's guide engineering
Projects
None yet
Development

No branches or pull requests

4 participants