Lack of interest Improve SEO when using notices by applying data-nosnippit to notice content

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

bzcomputers

Well-known member
Notices are often used to show content unrelated to the page they appear on. Notices are also often duplicated across multiple pages. As Xenforo sits currently, search engines may use the notice content as the "snippit", the search engines' description for the page, which is shown to all search users. This can greatly reduce the click through rate for a given page or group of pages.

I personally added a "Guest Registration" notice showing on most of my pages attempting to entice visitors to register. This caused numerous pages within Google Search to have the same identical snippit. Hundreds of pages with a snippit of: "If you are reading this it means you have not yet registered. Please take a second to register...". The snippits for those pages had been changed to the content of my sitewide registration notice. When this occurred the click through rate on the affected pages dropped off significantly.

There is a data-nosnippit HTML attribute for just this sort of thing. You can designate textual parts of an HTML page not to be used as a snippet. This can be done on an HTML-element level with the data-nosnippet HTML attribute on span, div, and section elements.

I suggest that an option be added to each individual notice created that allows the data-nosnippet attribute be applied to the content of that given notice.

Yes, this code can be added to the notice content itself, but this would require the notice creator to know this issue can exist and then know the proper solution to fix it. Whereas, if the notice option for data-nosnippet is available (with a description) creators will be informed of the possible snippit issue that can be created by a notice and then they have the ability to prevent or fix the issue with a simple option click.

HTML:
<p>This text can be shown in a snippet <span data-nosnippet>and this part would not be shown in a snippit</span>.</p>

<div data-nosnippet>not in snippet</div>
<div data-nosnippet="true">also not in snippet</div>
<div data-nosnippet="false">also not in snippet</div>

<section data-nosnippet>also not in a snippit</section>

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Upvote 6
This suggestion has been closed. Votes are no longer accepted.
The application of data-nosnippet should also be applied to the main cookie notice and now (with the update to XenForo 2.2.12) any place additional third party cookie notices appear, which could be numerous on a single page. Without data-nosnippet being applied to these notices, search engine snippets can be watered down with all this non-content related notice text.

Main Cookie Notice:
cookie-notice.webp

HTML:
<div class="notice-content" data-nosnippet>


Third Party Cookie Notice:
third-party-notice.webp

HTML:
<div class="block-rowMessage block-rowMessage--alt" data-nosnippet>
 
Is there an example of how to add this snippet to a notice?
HTML:
<p>This text can be shown in a snippet <span data-nosnippet>and this part would not be shown in a snippit</span>.</p>

<div data-nosnippet>not in snippet</div>
<div data-nosnippet="true">also not in snippet</div>
<div data-nosnippet="false">also not in snippet</div>

<section data-nosnippet>also not in a snippit</section>

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Back
Top Bottom