{"id":1409,"date":"2022-08-31T12:09:28","date_gmt":"2022-08-31T12:09:28","guid":{"rendered":"https:\/\/afreeurl.com\/automate-the-discovery-of-gsc-optimization-opportunities\/"},"modified":"2022-08-31T12:09:30","modified_gmt":"2022-08-31T12:09:30","slug":"automate-the-discovery-of-gsc-optimization-opportunities","status":"publish","type":"post","link":"https:\/\/afreeurl.com\/?p=1409","title":{"rendered":"Automate the discovery of GSC optimization opportunities"},"content":{"rendered":"<p><\/p>\n<p>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.<\/p>\n<p>This is a site with about 300 categories and 20,000 product SKUs.<\/p>\n<p>10 pages!<\/p>\n<p>So amazingly, almost 74.8% of all pages reported to GSC received no clicks.<\/p>\n<p>Today, I&#8217;ll share a Python script that pulls this information from Google Search Console, exporting platform-ready charts and an action-ready Microsoft Excel sheet.<\/p>\n<p><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p>The Excel sheet is very useful, with high and low traffic ranges split into their own tabs for action.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Excel sheet containing a breakdown of traffic ranges for each page\" width=\"710\" height=\"282\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/excel_output-62fcae9867255-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Microsoft Excel screenshot, August 2022<\/span><\/p>\n<p>Checkout is fully automated and works for any account you have access to in GSC.<\/p>\n<h2>What will we learn today?<\/h2>\n<p>How to run the script.  Key components and concepts of the screenplay.  Ideas for optimization.<\/p>\n<h2>Starting<\/h2>\n<p>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.<\/p>\n<p>The good news is that this file can be used over and over again for other Python projects, so it&#8217;s worth doing and keeping it safe.<\/p>\n<p>It shouldn&#8217;t take more than 5-10 minutes.<\/p>\n<p>There is a <a href=\"https:\/\/www.jcchouinard.com\/how-to-get-google-search-console-api-keys\/\" target=\"_blank\" rel=\"noopener\">excellent guide here<\/a> I recommend following.<\/p>\n<p>Once you have this file, save it somewhere safe, ready to upload.<\/p>\n<p>Now for the fun part: running the script!<\/p>\n<h3>Running the script<\/h3>\n<p>Running the script is simple.<\/p>\n<p>The idea is to run all cells simultaneously and load the credentials file when prompted.<\/p>\n<p>The script will automatically generate and save the bar charts, statistics and Excel document without further prompting.<\/p>\n<p><strong>Step 1<\/strong>: Open the <a href=\"https:\/\/colab.research.google.com\/github\/searchsolved\/search-solved-public-seo\/blob\/main\/search_engine_journal\/Top_Traffic_Pages_Search_Console_API_V1.ipynb\" target=\"_blank\" rel=\"noopener\">Google Collaboratory sheet<\/a>.<\/p>\n<p><strong>Step 2<\/strong>: At the top of the page, select Runtime > Run All (or press the shortcut keys Control + F9).<\/p>\n<p><strong>Step 3<\/strong>: When prompted, upload the credentials file that was downloaded after enabling the Search Console API.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Upload your Search Console API credentials to Google Collaboratory\" width=\"406\" height=\"399\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/upload_credentials_files-62f79dfe56789-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p>After the file is loaded, the next cell will ask you to visit a URL to authorize the application and enter the authorization code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Google collaboration cell to authenticate with Search Console\" width=\"818\" height=\"103\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/auth2-62fa02b31a006-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p>Click on it and choose the account associated with the GSC account you want to receive data from.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Google Search Console authorization code screen\" width=\"466\" height=\"718\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/authorization_code-62fa060f13169-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google.com, August 2022<\/span><\/p>\n<p>Next, we need to set the variables.<\/p>\n<p>It should be self-explanatory, but I&#8217;ll talk about each scenario and share an example.<\/p>\n<p><strong>url<\/strong><\/p>\n<p>The URL must exactly match how it appears in GSC.<\/p>\n<p>If there are problems, it&#8217;s because it&#8217;s usually missing a bar!<\/p>\n<p>Also note that for domain-level accounts, the syntax is:<\/p>\n<p style=\"text-align: center;\">sc-domain:example.com<\/p>\n<p>I&#8217;ve included an option to print the available GSC accounts if you&#8217;re having trouble.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Google Collabora Cell to view available Search Console accounts\" width=\"787\" height=\"125\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/print_available_properties-62fa0f56d0962-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p>Just uncomment the line:<\/p>\n<p style=\"text-align: center;\">#print(account.webproperties)<\/p>\n<p>\u2026 to see the list of accounts available to you.<\/p>\n<p>Copy and paste the account name exactly into the cell above.<\/p>\n<p><strong>Country filter<\/strong><\/p>\n<p>A simple variable to filter traffic by country.  To configure worldwide, just comment out this line:<\/p>\n<p>df_gsc = df_gsc[df_gsc[\u201ccountry\u201d].str.contains(country_filter)]# comment out this line for worldwide data<\/p>\n<p>A list of country codes can be found <a href=\"https:\/\/help.dashthis.com\/google-search-console-filters\" target=\"_blank\" rel=\"noopener\">here.<\/a><\/p>\n<p><strong>Search Type<\/strong><\/p>\n<p>The options available here are Web, News, Video, Image, Discover and GoogleNews.<\/p>\n<p><strong>Start\/end date<\/strong><\/p>\n<p>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:<\/p>\n<p style=\"text-align: center;\">YYYY-MM-DD<\/p>\n<p>Here is my setup to pull the last three months of data from the GSC property for Search Engine Journal.<\/p>\n<p>url=&#8221;<\/p>\n<p>country_filter = &#8220;USA&#8221;<\/p>\n<p>search_type = \u201cweb\u201d # available options are: web, news, video, image, discover and googleNews<\/p>\n<p>start_date = &#8220;2022-05-01&#8221;<\/p>\n<p>end_date = &#8220;2022-08-01&#8221;<\/p>\n<p>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.<\/p>\n<p>After the data extraction is complete, the next cell will create the data frame from the GSC data.<\/p>\n<p>The first 10 rows will be previewed so you can check that the data is correct.<\/p>\n<p>Scrolling down the page, you will notice that a bar chart has been created.<\/p>\n<p>This graph groups pages into ranges based on the number of clicks attributed to them.<\/p>\n<p>This makes it easy to see the distribution of clicks between pages at a glance.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Bar chart showing pages versus total clicks by traffic interval\" width=\"1242\" height=\"609\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/bar_chart_traffic_vs_clicks-62fca814acbb6-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p>The bar chart can be copied into presentations as needed and usually tells a powerful story with the data.<\/p>\n<p>In testing, I&#8217;ve found that most sites experience the same kind of traffic breakdown.<\/p>\n<p>Knowing which pages are responsible for a high percentage of traffic makes it easier to prioritize tasks for optimization.<\/p>\n<p>Just below the bar chart, some statistics are created and displayed.<\/p>\n<p>The percentage of pages on GSC without clicks.  The percentage of clicks generated on GSC&#8217;s top 10 pages.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"statistics show the percentage of pages in the search console that have 0 clicks\" width=\"481\" height=\"132\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/no_clicks_stats-62fca8114c767-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"statistics show how much traffic the top ten pages on your site are generating\" width=\"680\" height=\"136\" srcset=\"\" src=\"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2022\/08\/top_ten_pages_stat-62fca812dc88f-sej.png\" class=\" b-lazy pcimg\"\/><span class=\"wp-caption-text\">Screenshot from Google Colaboratory, August 2022<\/span><\/p>\n<p>Finally, a Microsoft Excel document is saved for the action.<\/p>\n<p>This document contains everything you need to create an action plan to optimize pages at the top and bottom end of the scale.<\/p>\n<h2>How can this data be used?<\/h2>\n<p>There are many creative ways to turn these ideas into action.<\/p>\n<h3>Main pages<\/h3>\n<p><strong>Check how each page looks in the SERPs<\/strong><\/p>\n<p>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?<\/p>\n<p><strong>Conversion rate optimization<\/strong><\/p>\n<p>Pages with high traffic are ideal candidates for A\/B testing \u2013 get statistically significant data faster!  Review and update content.<\/p>\n<p><strong>analysis<\/strong><\/p>\n<h3>Pages with zero traffic<\/h3>\n<p><strong>Review the pages in Search Console<\/strong><\/p>\n<p>Unindexed\/Tracked Unindexed review for technical blockers.  Are the pages in the sitemaps?<\/p>\n<p><strong>content<\/strong><\/p>\n<p>Review the content.  Is the content thin or lacking?  Is there a pattern to the pages that are not getting traffic?<\/p>\n<h2>Conclusion<\/h2>\n<p>These are just a few ideas of how someone could take action using the data, but I&#8217;m sure there are many more approaches that could be taken.<\/p>\n<p><strong>More resources:<\/strong><\/p>\n<p>Featured image: CG_dmitriy\/Shutterstock<\/p>\n<p>[ad_2]<br \/>\n<br \/><a href=\"https:\/\/www.searchenginejournal.com\/python-script-find-high-low-click-pages\/461247\/\" target=\"_blank\" rel=\"noopener\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Screenshot from Google Colaboratory, August 2022 Microsoft Excel screenshot, August 2022 What will we learn today? How to run the Key components and concepts of the Ideas for Starting Running the script Screenshot from Google Colaboratory, August&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1410,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo-news"],"_links":{"self":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/1409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1409"}],"version-history":[{"count":1,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/1409\/revisions"}],"predecessor-version":[{"id":1411,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/1409\/revisions\/1411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/media\/1410"}],"wp:attachment":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}