Automate the discovery of GSC optimization opportunities

Automate the discovery of GSC optimization opportunities

I recently discovered that 10 pages on our website accounted for over 61.2% of our total clicks reported in Google Search Console (GSC) over the past three months.

This is a site with about 300 categories and 20,000 product SKUs.

10 pages!

So amazingly, almost 74.8% of all pages reported to GSC received no clicks.

Today, I’ll share a Python script that pulls this information from Google Search Console, exporting platform-ready charts and an action-ready Microsoft Excel sheet.

Screenshot from Google Colaboratory, August 2022

The Excel sheet is very useful, with high and low traffic ranges split into their own tabs for action.

Excel sheet containing a breakdown of traffic ranges for each pageMicrosoft Excel screenshot, August 2022

Checkout is fully automated and works for any account you have access to in GSC.

What will we learn today?

How to run the script. Key components and concepts of the screenplay. Ideas for optimization.

Starting

Running the script is easy, but there is a little preparation involved in setting up access to the Google Search Console API and downloading a credentials file.

The good news is that this file can be used over and over again for other Python projects, so it’s worth doing and keeping it safe.

It shouldn’t take more than 5-10 minutes.

There is a excellent guide here I recommend following.

Once you have this file, save it somewhere safe, ready to upload.

Now for the fun part: running the script!

Running the script

Running the script is simple.

The idea is to run all cells simultaneously and load the credentials file when prompted.

The script will automatically generate and save the bar charts, statistics and Excel document without further prompting.

Step 1: Open the Google Collaboratory sheet.

Step 2: At the top of the page, select Runtime > Run All (or press the shortcut keys Control + F9).

Step 3: When prompted, upload the credentials file that was downloaded after enabling the Search Console API.

Upload your Search Console API credentials to Google CollaboratoryScreenshot from Google Colaboratory, August 2022

After the file is loaded, the next cell will ask you to visit a URL to authorize the application and enter the authorization code.

Google collaboration cell to authenticate with Search ConsoleScreenshot from Google Colaboratory, August 2022

Click on it and choose the account associated with the GSC account you want to receive data from.

Google Search Console authorization code screenScreenshot from Google.com, August 2022

Next, we need to set the variables.

It should be self-explanatory, but I’ll talk about each scenario and share an example.

url

The URL must exactly match how it appears in GSC.

If there are problems, it’s because it’s usually missing a bar!

Also note that for domain-level accounts, the syntax is:

sc-domain:example.com

I’ve included an option to print the available GSC accounts if you’re having trouble.

Google Collabora Cell to view available Search Console accountsScreenshot from Google Colaboratory, August 2022

Just uncomment the line:

#print(account.webproperties)

… to see the list of accounts available to you.

Copy and paste the account name exactly into the cell above.

Country filter

A simple variable to filter traffic by country. To configure worldwide, just comment out this line:

df_gsc = df_gsc[df_gsc[“country”].str.contains(country_filter)]# comment out this line for worldwide data

A list of country codes can be found here.

Search Type

The options available here are Web, News, Video, Image, Discover and GoogleNews.

Start/end date

Enter the start and end dates for which you want to extract the GSC data. I recommend at least three months if possible. The date format is:

YYYY-MM-DD

Here is my setup to pull the last three months of data from the GSC property for Search Engine Journal.

url=”

country_filter = “USA”

search_type = “web” # available options are: web, news, video, image, discover and googleNews

start_date = “2022-05-01”

end_date = “2022-08-01”

The data will be taken from GSC. This may take some time, depending on the size of the site and the number of months requested.

After the data extraction is complete, the next cell will create the data frame from the GSC data.

The first 10 rows will be previewed so you can check that the data is correct.

Scrolling down the page, you will notice that a bar chart has been created.

This graph groups pages into ranges based on the number of clicks attributed to them.

This makes it easy to see the distribution of clicks between pages at a glance.

Bar chart showing pages versus total clicks by traffic intervalScreenshot from Google Colaboratory, August 2022

The bar chart can be copied into presentations as needed and usually tells a powerful story with the data.

In testing, I’ve found that most sites experience the same kind of traffic breakdown.

Knowing which pages are responsible for a high percentage of traffic makes it easier to prioritize tasks for optimization.

Just below the bar chart, some statistics are created and displayed.

The percentage of pages on GSC without clicks. The percentage of clicks generated on GSC’s top 10 pages.

statistics show the percentage of pages in the search console that have 0 clicksScreenshot from Google Colaboratory, August 2022

statistics show how much traffic the top ten pages on your site are generatingScreenshot from Google Colaboratory, August 2022

Finally, a Microsoft Excel document is saved for the action.

This document contains everything you need to create an action plan to optimize pages at the top and bottom end of the scale.

How can this data be used?

There are many creative ways to turn these ideas into action.

Main pages

Check how each page looks in the SERPs

Does the relevant schema activate correctly? Are page titles/meta descriptions truncated? Are keywords missing from page titles/meta descriptions? Could page titles/meta descriptions be improved with better messaging, additional keywords, better CTAs, etc.? Are the correct sitelinks enabled?

Conversion rate optimization

Pages with high traffic are ideal candidates for A/B testing – get statistically significant data faster! Review and update content.

analysis

Pages with zero traffic

Review the pages in Search Console

Unindexed/Tracked Unindexed review for technical blockers. Are the pages in the sitemaps?

content

Review the content. Is the content thin or lacking? Is there a pattern to the pages that are not getting traffic?

Conclusion

These are just a few ideas of how someone could take action using the data, but I’m sure there are many more approaches that could be taken.

More resources:

Featured image: CG_dmitriy/Shutterstock

[ad_2]

Source link

You May Also Like

About the Author: Ted Simmons

I follow and report the current news trends on Google news.

Leave a Reply

Your email address will not be published. Required fields are marked *