Guide: Use REGEX to Find AI Driven Search Queries On Your Website

Plus new from Pinterest and ElevenLabs

From Our Sponsor:

Outrank Competition This Holiday Season with Micro-Influencers

The holidays are Amazon’s most competitive stretch - ad costs surge, placements tighten, and only brands that break through early win lasting rank visibility.

Most sellers face the same issues:

  • PPC costs spike 30–50% in Q4

  • Rankings freeze on page 2

  • Reviews trickle in too slowly

That’s where Lenny & Larry’s were stuck - until they used Stack Influence. We activated 1,560 influencers who each:

  1. Bought the product on Amazon (a verified purchase)

  2. Shared honestly on social media

  3. Left organic UGC that the brand could repurpose

The result? 🚀 11× sales, ⭐ 525 reviews, 👀 2.3M impressions - momentum ads can’t buy.

Get ahead of Q4 competition. Outrank your category before Black Friday hits.

Guide: Use REGEX to Find AI Driven Search Queries On Your Website

Understanding LLM-Generated Search Traffic

AI assistants like ChatGPT, Perplexity, and Claude increasingly drive search traffic by generating queries on behalf of users. These AI-generated queries differ from traditional searches—they tend to be longer, more conversational, and more specific. Understanding which queries come from AI systems and which pages they access allows you to optimize content specifically for AI visibility and citation.

This detection system combines Google Search Console query analysis with Google Analytics 4 traffic attribution to identify AI-driven search patterns and the pages that serve them.

Required Access

  • Google Search Console (property-level access)

  • Google Analytics 4 (property-level access)

Step 1: Set Up Query Filters in Search Console

Navigate to Search Console Performance section and create custom regex filters to identify AI-generated query patterns.

Filter Setup Process:

  1. Open Search Console → Performance

  2. Click Add filter → Query → Custom (regex)

  3. Paste your chosen regex pattern

  4. Apply and review results (Impressions, CTR, Position)

  5. Export filtered query list (Export > CSV)

Step 2: Apply Detection Patterns

Use these regex patterns to identify different types of AI-generated queries. Adjust word counts and terms based on your product category.

Long-Form Queries (10+ words):

^(\\S+\\s+){10,}\\S+

Modify the number 10 to detect different query lengths (use 4 for shorter or 25 for very long queries).

Transactional and Review Queries:

\\b(review|reviews|reddit|rating|ratings|support|warranty|return policy|refund|complaint|feedback|scam|legit|trustworthy|experience|issues|buy|purchase|price|cost|cheap|discount|coupon|order|store|near|online|sale|affordable|available|in stock|best|quality|features|specifications|warranty|deal|shop|compare|vs|versus)\\b

Product Recommendation Queries:

\\b(best|top-rated|trusted|famous|top|most|perfect)\\b

Informational Queries:

\\b(guide|tutorial|how to|step by step|tips|tricks|ways to|best way to|learn|help|explain|understand|examples|instruction|methods|meaning of|definition)\\b

Step 3: Identify AI-Attributed Pages in GA4

Track which pages receive direct traffic from AI platforms.

GA4 Configuration:

  1. Navigate to Reports → Engagement → Pages and screens

  2. Click Add filter

  3. Select Session source/medium dimension

  4. Set operator to "Contains"

  5. Enter value: chatgpt (or other AI platform identifiers)

  6. Apply filter and export URL paths as CSV

Alternative Approach: If you use server-side tagging or custom campaign parameters for AI platforms, filter by those dimensions instead.

Step 4: Correlate Query Patterns with Page Performance

Combine Search Console query data with GA4 page traffic to identify optimization opportunities.

Analysis Workflow:

  1. Export top pages from GA4 showing AI platform traffic

  2. Export query data from Search Console using regex filters (include Query + Page columns)

  3. Join datasets in a spreadsheet using page path as the common key (GSC's page column matches GA4's page_path)

  4. Identify priority pages that appear in both datasets

Priority Criteria:

  • Pages appearing in both GSC and GA4 exports

  • High impressions with low CTR (optimization opportunity)

  • Low position despite repeated AI-generated queries (citation risk)

Step 5: Take Action Based on Findings

For High-Impression, Low-CTR Pages:

Revise content structure with direct answer summaries, add FAQ sections with schema markup, and strengthen trust signals (dates, authors, citations).

For Low-Position Pages with AI Queries:

Clarify ambiguous language, improve answer extractability, add structured data, and ensure consistent terminology throughout.

For Correctly-Cited Pages:

Monitor performance trends, document successful patterns, and apply learnings to similar pages.

Measurement Approach

Track these indicators to evaluate your AI optimization efforts:

Weekly Monitoring: AI platform traffic volume from GA4, query pattern shifts in Search Console, position changes for targeted queries.

Monthly Analysis: CTR improvements on optimized pages, traffic growth from AI-attributed sources, correlation between query length and conversion.

Quarterly Review: Overall AI visibility trends, competitive citation analysis, ROI of optimization efforts.

Do You Love The AI For Ecommerce Sellers Newsletter?

You can help us!

Spread the word to your colleagues or friends who you think would benefit from our weekly insights 🙂 Simply forward this issue.

In addition, we are open to sponsorships. We have more than 53,000 subscribers with 75% of our readers based in the US. To get our rate card and more info, email us at [email protected]

Readers Voices:

I wanted to share a couple of reader’s voices from last week’s issues. I love hearing back from our readers so please share your thoughts - I learn a lot from this community.

From M.M

From A.H

From T.H

The Quick Read:

The Tools List:

🤖 Syncly - Surface real customer pains with AI feedback analysis.

🗒️ Doclime - Get answers from your documents

✒️ SmartWriter: AI-powered tool for personalised email marketing, automating outreach with mass customisation and high engagement rates.

📹 Captiwiz - Create videos with AI-powered captions.

🎨 Glif - Remix any image on the web.

📝 Fixkey - Improve your writing everywhere on macOS

About The Writer:

Jo Lambadjieva is an entrepreneur and AI expert in the e-commerce industry. She is the founder and CEO of Amazing Wave, an agency specializing in AI-driven solutions for e-commerce businesses. With over 13 years of experience in digital marketing, agency work, and e-commerce, Joanna has established herself as a thought leader in integrating AI technologies for business growth.

For Team and Agency AI training book an intro call here.

What did you think of today’s email?