Sub topic 2
Build a content inventory
A content inventory is a table with one row per indexable URL on your site, combining what the page is with how it performs. Every later step in this tutorial, from diagnosing declines to choosing between refresh and consolidation, starts from it.
This chapter assumes you can export reports from Google Search Console (Performance and Pages), read basic HTML and URLs, and edit pages in a CMS.
What the inventory contains
Keep the columns few and useful. Each one should help you make a decision later.
| Column | Source | Why it matters |
|---|---|---|
| URL | Sitemap or crawl | The unique key for each row |
| Title and H1 | Crawl | Shows the topic the page claims |
| Publish and last-modified date | CMS | Shows age and the last real edit |
| Clicks, impressions, average position | Search Console | Shows search performance |
| Top query | Search Console | Shows what the page actually ranks for |
| Inbound internal links | Crawl | Shows how well the site supports the page |
| Status code and indexability | Crawl | Flags technical problems |
Build it step by step
- List the URLs. Take them from your XML sitemap, then compare with a crawl from a tool such as Screaming Frog. Pages that appear in the crawl but not the sitemap, or the reverse, are worth noting.
- Export performance data. In Search Console, open Performance, set a date range of at least 12 months, and export the Pages table. Use the same range for every export.
- Add a comparison period. Export a second range, for example the previous 12 months, so each URL has a before and after value.
- Join on URL. Match rows by exact URL. Normalise trailing slashes,
httpversushttps, and query strings first, or the join will drop rows. - Add the CMS fields. Pull publish dates, last-modified dates and content type from the CMS.
- Mark pages with no data. A URL with zero impressions is still a row. It becomes a candidate for removal later.
flowchart TD
A[Sitemap and crawl URLs] --> D[Join on normalised URL]
B[Search Console export] --> D
C[CMS dates and types] --> D
D --> E[Content inventory]The block above is only a sketch of the data flow. The version below follows the required diagram format.
Join the data with code
The script below merges a crawl export with a Search Console export using pandas. It assumes crawl.csv has URL, Title and Last Modified columns, and gsc_pages.csv has Page, Clicks, Impressions and Position columns.
import pandas as pd
def normalise(url: str) -> str:
url = url.strip().lower().split("#")[0].split("?")[0]
return url.rstrip("/")
crawl = pd.read_csv("crawl.csv")
gsc = pd.read_csv("gsc_pages.csv")
crawl["key"] = crawl["URL"].map(normalise)
gsc["key"] = gsc["Page"].map(normalise)
inventory = crawl.merge(
gsc[["key", "Clicks", "Impressions", "Position"]],
on="key",
how="left",
)
inventory[["Clicks", "Impressions"]] = inventory[["Clicks", "Impressions"]].fillna(0)
inventory.drop(columns="key").to_csv("inventory.csv", index=False)
print(f"{len(inventory)} URLs, {(inventory['Impressions'] == 0).sum()} with no impressions")Common errors
- Using a short date range. Seasonal pages look dead outside their season, so use at least 12 months.
- Trusting the CMS modified date. Some systems update it when a plugin runs, not when someone edits the content.
- Leaving out pages with no traffic. These rows are often the clearest pruning candidates.
- Mixing URL variants. The same page then appears twice, with its performance split between the rows.
Exercise
Your inventory has 400 rows, but the sitemap lists 520 URLs. After the merge, 90 of the missing URLs had slightly different formatting in the two exports. Name two normalisation steps that would likely fix this and one risk of over-normalising.
Show answer
Strip trailing slashes and lowercase the URL, and also unify http and https and remove fragments. The risk is that removing query strings can merge distinct pages whose content depends on parameters, so you would see combined metrics for different pages.