Automate Multi-Site Reporting With Google Sheets And GSC API
Ludwig Makhyan, co-founder at MAZELESS, shares a 10-step process to automate multi-site reporting using Google Sheets and Google Search Console (GSC) API.
Create Your Google Sheets: Create a new Google Sheets file in your Google Drive.
Setting Up Your Google Sheet: Add headers in Row 1 such as Website, Niche, Clicks, Impressions, YoY Clicks, YoY Impressions, Clicks % Difference, Impressions % Difference.
Create A Google Cloud Console Data Project: Create a new project in Google Cloud Console and enable Google Search Console API.
Create Apps Scripts In Google Sheets: Integrate the Apps Script into the Google Sheet. Copy the provided code and paste it into your Apps Script project.
Set Up The Access Credentials: Set up Access Credentials in the Google Cloud Console. Enable the Google Search Console API and add users who have access to GSC.
Set Up Google Cloud Project For GSC Data: Copy the Project number from the Google Cloud Project and paste it into the Google Cloud Platform (GCP) Project section in your Apps Script tab.
Rename Your Google Apps Script: Rename your Apps Script to "My GSC Data Project Script."
Edit Google Apps Manifest File For Code.gs Script: Replace the content of the appsscript.json file with the provided script.
Adjust The Dates For Website Data Analysis: Specify the start and end dates for data analysis in your Google Sheets file.
Set Conditional Formatting For Non-Empty Cells Less Than Zero: Add conditional formatting to the “Clicks % Difference” and “Impressions % Difference” columns.
After these steps, you can input your Google Search Console properties in column A and run or refresh the report using the special menu Search Console > Fetch Data. The script supports about 150 domains, but can be adjusted for more. This process turns days of gathering data and running reports into a few minutes and can be expanded to perform other calculations or gather more data for your report. Automating reports streamlines tedious tasks and makes managing SEO data easier.