“Quick Overview” In the fast-paced digital world, Search Engine Optimization (SEO) is crucial for driving organic traffic to your website. To optimize your website’s performance, it’s essential to have accurate and well-structured meta titles, meta descriptions, H1 headings, status codes, canonical URLs, and word count. Manually extracting this information can be time-consuming, but with the power of Google Sheets and a custom script, you can automate the process and save valuable time.
In this blog, we’ll guide you through the steps to extract meta titles, meta descriptions, H1 headings, status codes, canonical URLs, and word count from a webpage using a custom Google Sheets script. By utilizing the “=seoscraper(A2)” formula, you can quickly gather essential SEO information without leaving your spreadsheet.
Getting Started!
Before diving into the technical aspect, ensure you have a Google account and access to Google Sheets. If you don’t have experience with Google Sheets, don’t worry—our step-by-step guide will make the process easy to follow.
Step 1: Create a New Google Sheet
Open Google Sheets and create a new blank sheet. Label the columns as follows: “URL” (for the webpage URLs you want to extract data from), “status codes,” “Meta Title,” “Meta Description,” “H1 Heading,” “H2,” “H3,” “Meta Robots,” “canonical URLs,” and “word count”.
Step 2: Enable Google Apps Script
To use custom scripts, you need to enable Google Apps Script in your Google Sheet. Here’s how:
- Click on “Extensions” in the top menu.
- Select “Apps Script.”
- Click on “Create” to create a new script project.
Step 3: Writing the Custom Script
In the Google Apps Script editor, you’ll find a default function named “myFunction.” Replace it with this script.
Step 4: Add the Cheerio Library ID and Save and Execute the Script
After writing the custom script, save the project by clicking on the floppy disk icon or pressing “Ctrl + S” (Windows) or “Cmd + S” (Mac). Now, let’s run the script:
Go back to your Google Sheet.
In cell B2 (assuming URL data starts from cell A2), enter the formula “=seoscraper(A2)”.
Press “Enter,” and the script will fetch data from the URL in cell A2 and populate the status codes, meta title, meta description, and H1 heading in cells B2, C2, and D2, respectively.
Step 5: Autofill and Review
Now that you have the data for one URL, you can easily autofill the formula for other URLs in your sheet. Drag the formula down to apply it to additional rows.
It’s important to review the results and make sure the script worked as expected. If the script couldn’t find any data, it will display “No meta title found,” “No meta description found,” or “No H1 heading found.” Double-check the webpages for any potential issues with their meta tags or H1 headings.
Conclusion
Automating the extraction of status codes, meta titles, meta descriptions, H1 headings, canonical URLs, and word count with Google Sheets using a custom script can significantly speed up your SEO analysis and optimization process. By leveraging the power of Google Apps Script, you can save valuable time and focus on enhancing your website’s search engine visibility.
Remember, SEO best practices are continually evolving, so staying up-to-date with the latest trends and algorithm changes will ensure your website remains relevant and competitive in the digital landscape.
For step by step guide: https://youtu.be/cgPrzqZ6L3w