SEO Script Documentation

This document outlines the functionality and usage of a Java script designed to automate basic Search Engine Optimization (SEO) tasks for your website.

Important Note: This script is intended as a starting point and may not address all SEO best practices.

Functionality:

The script performs the following SEO actions:

  • Meta Tag Analysis: Checks for the presence and completeness of essential meta tags like title tags and meta descriptions. Then modifies them if improvements should be made.
  • Heading Tag Optimization: Analyzes the usage of heading tags (H1, H2, etc.) and ensures proper hierarchy and keyword placement.
  • No Image Alt/Title Text: Alt and title tags give a text description of your image. It’s technically an HTML requirement and also an important accessibility issue. You can edit the descriptions we’ve added below, and then click approve to add these tags to your images.
  • Interlinks: Suggested interlinks that match your Keywords
  • Add a Social Preview: Ever share your site on social media? That image and text you see is your social preview. You can use that to best optimize clicks and engagement. Edit and approve the recommendation to add a social preview card across your site.
  • Links Missing Titles: Link titles not only tell Google what your link is about, but they are also used as previews in browsers and by users with disabilities. Making your site as accessible as possible is an important quality factor.
  • External Link Target: You have external links to other websites on these pages which are not being opened in new browser tabs. This is generally considered a best webmaster practice. Approve these pages below to have those links automatically open in new tabs.

The generated JavaScript snippet needs to be added to your website. The JavaScript code should include in the <HEAD> tag of your site right before the closing </HEAD> tag.

Here are the steps on how to add your JavaScript snippet:

Important: Before you begin, make sure that your site is published and has a connected domain.

  1. Go to Settings in your site’s dashboard.
  2. Click the Custom Code tab under Advanced Settings.
  3. Click + Add Custom Code at the top right.
  4. Paste the code snippet in the text box.
  5. Enter a name for your code.
    Tip: Give it a name that is easy to recognize so you can quickly identify it later.
  6. Select an option under Add Code to Pages:
    • All pages: This adds the code to all of your site’s pages, including any new pages that you’ll create in the future. Choose whether to load the code only once per visit or on each page your visitor opens.
    • Choose specific pages: Use the drop-down menu to select the relevant pages.
  7. Choose where to place your code:
    • Head
  8. Click Apply.

Disclaimer:

This script automates basic SEO checks. For comprehensive SEO optimization, consider strategies like:

  • Keyword Research: Identify relevant keywords that users search for and optimize content accordingly.
  • Content Quality: Create high-quality, informative content that engages users.
  • Website Speed: Ensure your website loads quickly to improve user experience and SEO ranking.
  • Mobile Friendliness: Make sure your website is optimized for mobile devices.

Known Conflicts

WP Rocket

Issue:

Delay JavaScript Execution. On all JavaScript, either with a src attribute or not, a type="rocketlazyloadscript" attribute will be added. This fake type value prevents the browser from executing the script.

Solution:

  1. Go to the WP Rocket plugin settings.
  2. Click on the “File Optimization” tab on the left navigation.
  3. Uncheck the Delay JavaScript Execution box.