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

Research removal of "FEC | "and " - FEC.gov" from global search results titles #5945

Open
6 tasks
Tracked by #104
JonellaCulmer opened this issue Oct 4, 2023 · 3 comments · May be fixed by #6033
Open
6 tasks
Tracked by #104

Research removal of "FEC | "and " - FEC.gov" from global search results titles #5945

JonellaCulmer opened this issue Oct 4, 2023 · 3 comments · May be fixed by #6033
Assignees
Milestone

Comments

@JonellaCulmer
Copy link
Contributor

JonellaCulmer commented Oct 4, 2023

What we're after:
Following the site map work, we are now displaying - FEC.gov at the end of many wagtail pages. We would like to remove this as it adds no value while on the FEC website and potentially creates confusion regarding the storage of our content.

Slack discussion: https://fecgov.slack.com/archives/C3X3K6EVA/p1695909045823319

Completion criteria

  • Research has been documented
  • Next steps for removal have been proposed
  • Followup tickets created for next steps.

Research considerations

  • Document where the FEC | prefix and - FEC.gov suffix are coming from
  • Document who's reading what (e.g. Google, Bing, social media, search.gov, fec.gov search results)
  • Determine a path to fix based on the aforementioned topics
@JonellaCulmer JonellaCulmer added this to the Sprint 22 innovation milestone Oct 4, 2023
@dorothyyeager dorothyyeager removed this from the Sprint 22 innovation milestone Nov 2, 2023
@JonellaCulmer JonellaCulmer added this to the Sprint 23.4 milestone Nov 2, 2023
@JonellaCulmer JonellaCulmer changed the title Research and document solutions to removing "FEC.gov" from global search results Research and remove "FEC.gov" from global search results Nov 22, 2023
@JonellaCulmer JonellaCulmer changed the title Research and remove "FEC.gov" from global search results Research removal of "FEC.gov" from global search results Nov 22, 2023
@rfultz
Copy link
Contributor

rfultz commented Nov 22, 2023

FTR, we're adding the - FEC.gov suffix in two-ish places (two lines of two templates) and | FEC* in 10 places

image

image

@rfultz
Copy link
Contributor

rfultz commented Nov 22, 2023

https://developers.google.com/search/docs/appearance/title-link

How title links in Google Search are created
Google's generation of title links on the Google Search results page is completely automated and takes into account both the content of a page and references to it that appear on the web. The goal of the title link is to best represent and describe each result.

Google Search uses the following sources to automatically determine title links:

  • Content in <title> elements
  • Main visual title shown on the page
  • Heading elements, such as <h1> elements
  • Other content that's large and prominent through the use of style treatments
  • Other text contained in the page
  • Anchor text on the page
  • Text within links that point to the page
  • WebSite structured data

@johnnyporkchops johnnyporkchops changed the title Research removal of "FEC.gov" from global search results Research removal of "FEC | "and " - FEC.gov" from global search results Dec 11, 2023
@johnnyporkchops johnnyporkchops changed the title Research removal of "FEC | "and " - FEC.gov" from global search results Research removal of "FEC | "and " - FEC.gov" from global search results titles Dec 11, 2023
@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Dec 12, 2023

Where the prefix/suffix come from:

The "FEC | ..." prefix comes from the title_tag field in Wagtail editing template's promote tab ( it's called seo_title in the database).

  • According to the conditional statement in the base.html template , from which all cms pages* inherit, the title will use the title_tag(seo_title) value if present, for a prefix, othewise a suffix of " | FEC" is added. (*data and legal base templates do not have this conditonal statemtent)
  • The title_tag(seo_title) value from the Wagtail template is used in the page's browser tag
  • It also shows up in the title on search-result listings
  • However, the following pages that use get_content_secrtion(self) in models.py do not show value from the title_tag(seo_title) in search-result listings. Instead, they get a suffix of "- FEC.gov" from meta tags in partials/mets-tags.html
    • ResourcePage, CustomPage, RecordPage, CollectionPage, DocumentFeedPage

How to remove the prefix/suffix from search.gov, site-search results:

The below draft pull request has a filter added to the search.html template to remove both pattens (FEC | and - FEC.gov) from the titles of site-search results.

@johnnyporkchops johnnyporkchops modified the milestones: 24.5, 24.4 Mar 25, 2024
@JonellaCulmer JonellaCulmer modified the milestones: 24.4, 24.5 Mar 29, 2024
@JonellaCulmer JonellaCulmer modified the milestones: 24.5, 24.6 Apr 18, 2024
@pkfec pkfec modified the milestones: 24.6, 24.i Apr 23, 2024
@JonellaCulmer JonellaCulmer modified the milestones: 24.i, 25.4 May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 Ready
Development

Successfully merging a pull request may close this issue.

6 participants