Best Sellers to XML Sitemap
Use cases
Creates XML sitemaps (protocol v0.9) from Google Analytics Excel exports using Jinja2 templating.
Filters to top X% by transactions or revenue (rows are kept in file order, so the export must already be sorted by the chosen metric), excludes URLs matching patterns (checkout, basket, paypal, search, account, plus GA "(not set)" rows), removes duplicates, and assigns 0.80 priority.
Ready for Search Console submission.
Platform
Jupyter Notebook (requires Python environment)
Input
GA landing page Excel export
Domain URL
Output
XML sitemap with top-performing product URLs
Features
- Jinja2 XML sitemap templating (protocol v0.9)
- Transactions or Revenue metric (export must be pre-sorted by the metric)
- Top percent threshold (default 5%)
- Pattern-based URL exclusion (checkout|basket|paypal|search|account|(not set))
- Query string stripping and duplicate removal on path
- Priority 0.80 on every URL; lastmod is a filler date series starting today
How to use
- 1 Export GA landing page report as Excel (sheet Dataset1, Universal Analytics format)
- 2 Sort the export by your chosen metric (the top percent filter follows file order)
- 3 Set your domain, metric and top percent in the notebook
- 4 Run all cells and upload the export when prompted
- 5 Download high_value_landing_pages.xml
- 6 Submit to Search Console
Frequently asked questions
- What exact input file does it expect?
- A Google Analytics landing page report exported as Excel; CSV is not accepted. The notebook reads a sheet named Dataset1 and needs a Landing Page column plus a Transactions or Revenue column. This is the legacy Universal Analytics export format (Behaviour > Site Content > Landing Pages), so a GA4 export needs reshaping to match.
- Do I need to sort the export before uploading?
- Yes, sort it by your chosen metric first. The notebook sorts by the metric but then keeps rows by their original file position (the index is not reset), so the top X percent is effectively taken in the order the file arrived, not by transactions or revenue. Pre-sorting the export by the metric makes the filter behave as intended.
- Why does it error when I select Revenue?
- The metric column is cast with astype(int), so currency symbols, thousands separators or decimal values in the Revenue column raise an error. Clean the column to plain whole numbers before uploading.
- What happens to URLs with query strings?
- Only the path is kept: query strings are discarded during URL parsing, anything after an ampersand is cut, and rows are deduplicated on path. Parameterised landing page variants therefore collapse into one clean URL, and the homepage path (/) is always excluded along with checkout, basket, paypal, search, account and GA's (not set) rows.
- Where do the lastmod dates come from?
- They are not real modification dates. The notebook assigns a date series starting today and incrementing one day per URL, so most URLs get lastmod dates in the future. Treat lastmod as filler, or edit the XML if your consumers care about it. Priority is hardcoded to 0.80 for every URL.
Want me to run this for you?
I run this tool as a managed service, or build something custom around your data. You get the insights without touching the code.
Related Tools
Suggest new category pages based on product H1 n-grams and search demand.
Center product images using OpenCV multi-method contour detection with threshold fallbacks.
Find higher resolution images using Google Vision API with Playwright fallback and human-like delays.
Map site search queries to existing pages and discover content gaps from user behaviour.
Add branded headers to PDFs using PyPDF2 and ReportLab with responsive text scaling.
Calculate CPC, total spend, or clicks from any two values.
Need something built for your business?
This tool started as bespoke client work. I build custom scripts, data pipelines, and full apps for SEO and product data problems that off-the-shelf tools don't solve.
Tell Me What You Need