BLOG
How to Check Your Brand’s AI Visibility Using Python
Brand Visibility
GEO
Python for SEO
ChatGPT
LLM Optimization
Google is no longer the only place people search. Millions now ask ChatGPT, Claude, Gemini, and Perplexity for recommendations. If your brand isn’t showing up in those answers, you’re invisible to a growing segment of your audience. Here’s how I built a simple tracker to measure it.
Why AI Visibility Matters for SEO in 2025
Traditional SEO tracks keyword rankings on Google. But when someone asks ChatGPT “Who are the best online Hindi class providers?” — does your brand get mentioned? That’s AI Visibility, and it’s becoming a critical metric for every digital marketer.
This is now being called GEO — Generative Engine Optimization. Just like we optimised for search engines, we now need to optimise for large language models (LLMs). As an SEO professional, I built a lightweight Python script to audit exactly this — and I’m sharing the full approach here.
“If your brand isn’t mentioned when an AI answers your customer’s question, you’ve lost that touchpoint — silently.”
What This Script Does
The script sends a set of targeted prompts to the OpenAI API (GPT model) — the same prompts your potential customers might type — and logs the full responses. It then checks whether your brand name appears in those responses and exports everything to an Excel file for analysis.
Think of it as a rank tracker — but for AI answers.
Prerequisites: What You Need
pip3 install openai pandas openpyxl
Step 1: Set Up Your Project Folder
Open your terminal and create a dedicated folder for this project:
mkdir ~/Documents/ai-visibility-tracker
cd ~/Documents/ai-visibility-tracker
touch tracker.py
open -e tracker.py
This creates a new directory, navigates into it, creates your Python file, and opens it in TextEdit for editing.
Step 2: The Complete Tracker Script
Paste this into your tracker.py file. Replace YOUR_API_KEY_HERE with your actual OpenAI key, and update the brand name and prompts to match your business:
import openai
import pandas as pd
import datetime
# ── Configuration ─────────────────────────────────────────
openai.api_key = "YOUR_API_KEY_HERE"
client = openai.OpenAI(api_key=openai.api_key)
BRAND_NAME = "wizmantra" # lowercase for case-insensitive matching
# ── Prompts to test (customise these for your brand) ──────
prompts = [
"What is WizMantra?",
"Who are the top online English class providers?",
"Tell me about Hindi classes in the UAE.",
"Which companies offer Sanskrit language courses online?"
]
# ── Main tracking loop ────────────────────────────────────
records = []
for prompt in prompts:
try:
response = client.chat.completions.create(
model="gpt-3.5-turbo", # switch to "gpt-4" if available
messages=[{"role": "user", "content": prompt}],
temperature=0.7
)
answer = response.choices[0].message.content
# Check if brand is mentioned in the AI's response
brand_visible = "Yes" if BRAND_NAME in answer.lower() else "No"
records.append({
"date": datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
"prompt": prompt,
"response": answer,
"brand_visible": brand_visible
})
except Exception as e:
records.append({
"date": datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
"prompt": prompt,
"response": f"Error: {e}",
"brand_visible": "Error"
})
# ── Export results to Excel ───────────────────────────────
df = pd.DataFrame(records)
df.to_excel("ai_visibility_log.xlsx", index=False)
print("✅ Done! Results saved to ai_visibility_log.xlsx")
Step 3: Run the Script
Save the file, then go back to your terminal and run:
python3 tracker.py
You’ll see: ✅ Done! Results saved to ai_visibility_log.xlsx
Open the Excel file — it will look something like this:
| Date | Prompt | Response (truncated) | Brand Visible |
|---|---|---|---|
| 2026-01-06 10:49 | What is WizMantra? | WizMantra is an online language learning platform… | Yes |
| 2026-01-20 11:01 | Who are the top online English class providers? | Some popular platforms include Coursera, Preply… | No |
| 2026-02-18 12:46 | Tell me about Hindi classes in the UAE. | Several institutes offer Hindi classes in the UAE… | No |
| 2026-02-18 12:47 | Which companies offer Sanskrit language courses online? | WizMantra is one platform that offers Sanskrit… | Yes |
How to Interpret Your Results
The Brand Visible column is your core metric. Here’s how to think about it:
- Direct brand prompts (e.g. “What is WizMantra?”) should almost always return “Yes”. If not, your brand has zero footprint in the AI’s training data — a serious signal.
- Category prompts (e.g. “top online English class providers”) showing “No” means competitors are capturing those AI-generated recommendations instead of you.
- Run this script monthly to track improvements over time as you build more content and citations.
How to Improve Your AI Visibility (GEO)
Once you know where you’re invisible, here’s how to fix it:
- Build authoritative content — LLMs are trained on the web. The more high-quality, well-cited content exists about your brand, the more likely it surfaces.
- Get mentioned on third-party sites — Wikipedia, industry directories, review platforms, and news sites all feed AI training data.
- Use structured data (Schema markup) — Helps AI systems understand your brand’s entity clearly.
- Answer specific questions — Write detailed FAQ and “best of” style content that mirrors how users phrase questions to AI.
- Build brand signals — Consistent NAP (Name, Address, Phone), social profiles, and press coverage all build brand entity strength.
Scaling This Further
This script is a solid foundation. Here’s how you can extend it:
- Test across multiple AI models — OpenAI, Claude (Anthropic API), Gemini — since each has different training data.
- Add a sentiment column — not just whether your brand is mentioned, but how positively.
- Schedule it with cron on Mac/Linux to run weekly automatically.
- Feed results into Google Sheets for a live dashboard.
How SEO Helped a Fashion E-Commerce Brand Grow from 0 to 120,000 Monthly Organic Visitors in 14 Months (A Practical Shopify Case Study)
December 21, 2025 · 14 min read · By Ram Kr. Shukla
|
120K Monthly Organic Visitors |
9% Brand Conversion Rate |
14 mo Time to Results |
A practical Shopify SEO case study on the architecture decisions, content fixes, and structural work that made sustainable organic growth possible — without shortcuts or tricks.

Organic traffic growth across the 14-month engagement
Scaling organic traffic for a fashion brand is rarely clean or linear. The industry moves fast, competition is unforgiving, and the way customers actually search looks nothing like what store owners expect. Layer Shopify’s structural tendencies on top — URL bloat, variant duplication, app-generated pages — and most stores end up stuck before they’ve even started.
This project began in exactly that position. A leading fashion brand on Shopify. Over 200,000 URLs in the index. Zero meaningful organic traffic. Real inventory, real ambition, and no search visibility to show for any of it.
Fourteen months later, the same store was pulling 120,000 monthly organic visitors, converting at 9% on brand queries and 2.6% on non-brand, and competing with established category leaders in organic search. Here’s a clear-eyed account of how that happened.
Shopify is a genuinely good platform for running an online store. But it consistently generates far more URLs than any crawl budget can justify — and most merchants don’t realize this until the damage is already done.
By the time the first technical audit was complete, the store’s crawlable index looked like this:
Before chasing rankings, the priority was controlling what Google was actually seeing. At that point, Google was seeing chaos — and indexing very little of it.
Fashion brands almost universally underinvest in product copy. Descriptions tend to be a few words — sometimes just a color and material, often nothing more than a truncated line from the manufacturer. Google responds predictably: it allocates minimal crawl budget, indexes selectively, and rarely ranks pages that offer nothing beyond what competing stores already show.
When 70–80% of a site’s inventory pages are essentially duplicate shells, the whole domain suffers — not just the individual thin pages.
What changed with product content
The goal wasn’t to pad pages with words. It was to give both customers and search engines enough to make sense of each product. Once indexing stabilized, impressions in Google Search Console started climbing — slowly at first, then with real momentum.
Fashion shoppers don’t search the way store owners expect. They rarely type in a product name or SKU. They search for categories, occasions, and contexts — “black maxi dress,” “summer tops for women,” “high-waist trousers,” “party wear gowns.” This traffic carries enormous commercial intent, and all of it lands on collection pages, not individual products.
If your collection pages are weak, no amount of product-level SEO will compensate. So collection pages became the primary focus of the entire strategy.
What went into each collection page
Within a few months, category pages were pulling organic traffic that product pages never could on their own. Over time, collection pages became responsible for over 70% of all organic revenue from the site.
When a store carries thousands of products across dozens of categories, search engines need help understanding how everything relates. Without a clear structure, Google treats each page in isolation — and pages in isolation rarely rank for anything competitive.
Screaming Frog was used to map the entire internal linking structure, then rebuilt it with intent.
Clusters built for this brand
Each cluster followed a clear hierarchy: main collection → sub-collection → individual product → supporting blog content. This structure signals depth and topical completeness — two things Google consistently rewards in competitive categories.
One of the more surprising findings in the audit was how deep important pages were buried. Some of the brand’s best-selling collections sat five or six clicks away from the homepage. That depth sends Google a clear signal: these pages are not important. Crawl budget gets rationed accordingly, and rankings follow.
Structural fixes that moved the needle
Within a few months, priority collection pages sat comfortably at depth one or two. Google crawled faster, indexed more completely, and began ranking pages that had previously been invisible.
Fashion content planning often stops at the editorial calendar — festive season, spring/summer, sale, repeat. That approach misses most of the organic opportunity. SEO growth requires evergreen, seasonal, and trend-driven content working together, with each piece reinforcing the site’s topical authority.
What the content calendar included
Every piece of content was built to internally link back to relevant collection pages — reinforcing clusters, strengthening topical relevance, and giving Google additional signals about what this brand covers authoritatively.
Fashion e-commerce is image-heavy, app-heavy, and often built on themes that weren’t designed with crawlability or page speed in mind. The technical debt compounds quietly until it becomes a ceiling on what content and structural work can achieve.
Technical fixes completed during the engagement
None of this is glamorous. But technical stability is what allows content and structural improvements to actually perform.
Traffic didn’t spike. It built steadily, with each phase of work raising the ceiling for what came next.
|
Monthly Organic Visitors 120K From zero at project start |
Brand Conversion Rate 9% High-intent brand traffic |
|
Non-Brand Conversion Rate 2.6% Category-level traffic converting |
Organic Revenue via Collections 70%+ Collection pages drove majority of revenue |
This project reinforced something most teams only discover after months of frustration: Shopify SEO is not won through clever tactics or tool hacks. It’s won through structure.
— Ram Kr. Shukla, SEO & Growth Consultant
Once the architecture is clean, the compounding effect is real. Collection pages start ranking faster. Product pages get indexed more reliably. Blog content reinforces category authority. Internal links elevate entire clusters. Google extends trust across the domain rather than evaluating each page in isolation.
That’s the difference between organic growth that happens by accident — and organic growth that becomes predictable, scalable, and tied directly to revenue.
If your Shopify store is in a similar position — real products, real ambition, but search visibility that doesn’t reflect either — the answer is almost certainly structural before it’s anything else.

SEO & AI Growth Consultant
18+ years across SEO, programmatic media, and performance marketing. Partner to founders and CMOs scaling B2B, SaaS, and e-commerce brands through data-driven organic growth strategies.
Is Your Shopify Store Sitting on Untapped Search Potential?
Let’s spend 30 minutes reviewing your SEO setup, identifying structural gaps, and outlining exactly where your growth is being held back.
Schedule a Free Growth Call
How Advanced SEO Turned an E-Commerce Store Into a ₹5Cr/Month Brand

Is ranking on the first page of Google really worth it for e-commerce businesses? Wouldn’t it be faster and simpler to just run paid ads on Meta or Google Shopping? What’s the actual return — and will SEO ever generate enough revenue to justify the wait?
These are questions I hear from e-commerce founders, D2C brand owners, and digital marketing managers almost every week. The hesitation is understandable — SEO is slow, nuanced, and notoriously hard to attribute in the early months. But here’s the truth: when done with precision, SEO becomes the most scalable, cost-efficient revenue engine an e-commerce brand can build. I recently worked with — and studied in depth — an Indian D2C e-commerce brand (in the lifestyle and wellness space) that took this leap. The results they achieved in under two years make a compelling case that every e-commerce operator needs to see.
Here are the actual numbers that drove their transformation:
E-Commerce Brand: Revenue, Growth & SEO Numbers
| Business Model | D2C E-Commerce (Lifestyle & Wellness, India) |
| Annual Revenue Run Rate | ₹48–55 Crore (high seven-figure INR ARR) |
| Markets Served | India (Tier 1, 2 & 3 cities), UAE, UK |
| Monthly Organic Sessions | 18,000+ qualified sessions/month from search |
| Organic Traffic Growth | 312% in 22 months |
| Primary Acquisition Channel | Organic Search (SEO + Content) |
| SEO + Content Investment | ₹3.5–4 Lakh/month |
| Month-over-Month Revenue Growth | 8–11% MoM (consistent) |
| SEO Timeline to Break-Even | 6–9 months (established brand) / 18–24 months (new brand) |
Where It All Started: The Problem With Paid-Only Growth
When this brand came to the SEO table, they were already doing decent numbers — roughly ₹8–10 Crore annually — entirely on the back of Meta ads and influencer campaigns. Their ROAS was around 2.8x, which looked fine on paper. But CPMs were climbing quarter on quarter, their customer acquisition cost had nearly doubled in 18 months, and one bad iOS privacy update had knocked their attribution into chaos. Sound familiar?
The core problem was dependency. Every rupee of revenue required a rupee (or more) of ad spend to sustain it. The moment the ad tap turned off, so did the orders. There was no compounding asset being built. SEO was the missing piece — not as a replacement for paid, but as a foundation that would make every other channel cheaper and more effective.
“Paid ads are a tap. SEO is a well. One you rent, one you own. The smartest e-commerce brands build both — but they never confuse one for the other.”
— Ram Kr. Shukla, SEO & Content Strategy
The Advanced SEO Tactics That Drove 312% Organic Growth
This wasn’t a “publish 3 blogs a week and wait” strategy. What moved the needle was a combination of technical precision, content architecture, and intent-mapping that most e-commerce brands simply don’t execute at this level. Here’s what was done:
1. Topical Authority Mapping (Not Just Keyword Research)
The first 60 days were spent building a full topical authority map — not just a keyword list. We identified 8 core content clusters around the brand’s product categories and buyer journey stages (awareness → consideration → decision). Each cluster had a pillar page, 6–10 supporting articles, and a clear internal linking strategy. Google rewards topical depth, not volume. Before writing a single word, the architecture was defined.
2. Category & Collection Page SEO (The Revenue Pages)
Most e-commerce SEO efforts focus entirely on blog content and completely neglect the pages that actually convert — category and collection pages. We rewrote every major category page with: keyword-rich, unique H1s and meta descriptions; 150–200 word SEO-optimised introductory copy above the fold; structured FAQ sections using Schema markup; and canonical tag hygiene across filtered URLs. These pages became the highest-converting organic landing pages within 6 months.
3. Core Web Vitals & Technical SEO Overhaul
A full technical audit revealed 340+ crawl errors, duplicate content from faceted navigation, missing Schema on product pages, and an LCP (Largest Contentful Paint) score above 4.8 seconds on mobile. Fixing these alone — before a single new content piece — produced a 27% lift in organic impressions within 10 weeks. Technical SEO isn’t glamorous, but it’s the bedrock everything else rests on.
4. Product-Led Content (Buying Guides That Actually Convert)
Rather than generic “top 10 tips” blog posts, we built deep buying guides targeting high-intent comparison and “best [product type] in India” keywords. Each guide was 2,000–3,500 words, included original data, internal links to product pages, and a recommendation matrix. These single pages now collectively drive over 4,200 organic sessions per month and contribute to a 3.1% organic conversion rate — more than double the site average.
5. Digital PR & Programmatic Link Building
Link building for e-commerce is different from SaaS. We deployed two parallel strategies: (a) Digital PR — creating data-driven studies around wellness/lifestyle trends in India that earned natural coverage on YourStory, Inc42, and Healthshots; and (b) Programmatic outreach targeting relevant niche bloggers and review platforms with a structured content partnership framework. Over 22 months, this built 280+ high-quality referring domains — up from just 34 at the start.
RAM KR SHUKLA
With 15+ years of experience in SEO and growth marketing, I help SaaS, software, technology, ecommerce and IT companies build predictable revenue through scalable, performance-driven search and acquisition strategies.
My work focuses on long-term growth, combining SEO, AI-driven optimization, content, and paid acquisition. I partner with founders and marketing teams who value clarity, execution, and sustainable results.
Recent Blog Posts
-
How to Check Your Brand's AI Visibility Using Python02 Mar 2026
-
How SEO Helped a Fashion E-Commerce Brand Grow from 0 to 120,000 Monthly Organic Visitors in 14 Months (A Practical Shopify Case Study)21 Dec 2025
-
How Advanced SEO Turned an E-Commerce Store Into a ₹5Cr/Month Brand05 Aug 2025
-
How Content Marketing and SEO Helped BuildFire Become a 7-Figure ARR SaaS Company05 Aug 2025
-
How Incapsula Doubles Their Business Year Over Year With SEO, Content Marketing and CRO05 Aug 2025
Services
Google Certified