I often open Google Search Console to get statistics about my website in search. Instead of having to open the browser for this, I want to have an easier way to see it straight away in 🧑💻️ VSCode and get statistics specific to the page I have opened.
Initially, to avoid having to start from scratch, this will be part of my existing 🧑💻️ My Custom VSCode Extension. I might split it out to a dedicated extension later if I have proven to myself the functionality is valuable.
Requirements
- APIs: get search metrics through the API in VSCode
- URL Mapping: Fetch data based on different URLs for the same page
APIs
Google has a repo for Google API NodeJS Client, which will be used as the basis for the functionality.
@googleapis/searchconsole
can be used to specifically pull in the package for Search Console, which reduced the size of the dependency I assume.
An error you could potentially run into is:
To solve this run:
URL Mapping
I have recently introduced the 🔗 Permalinks functionality to my website. This means that multiple URLs can link to the same page.
TBD if I want to support either the permalink or the original URL or both.