The whole game is changing with AI-powered search, so your campaign tracking has to change with it. If you’re still just using traditional URL parameters, you’re not getting the full picture of attribution, especially when users are poking at a generative AI before they ever see your site. If you ignore these shifts, you’re working with bad data, which is a fast track to wasting your budget and missing out on what’s actually working.
Key Takeaways
- You need new custom parameters, like `utm_ai_source` and `utm_ai_query`, to separate out AI search traffic.
- Configure Google Analytics 4 (GA4) so it can actually see and report on these new AI-specific parameters for real segmentation.
- Check your parameter setup in Google Ads and Microsoft Advertising all the time to make sure you’re keeping up with their new AI search rules.
- Decide on a clear naming convention for your AI parameters from day one to keep your data clean and make analysis less of a headache.
- If you can, use server-side tagging for this stuff. It’s way more accurate and gets around a lot of the client-side ad-blocking junk.
Setting Up AI-Specific URL Parameters in Google Ads (2026 Interface)
Your first stop for AI search tracking is inside your advertising platforms. We’re aiming for real granularity here, which means going beyond just adding another generic `utm_source`.
Step 1: Accessing Tracking Templates
Okay, log into your Google Ads account. In the left menu, click All campaigns, then select Settings. Scroll down to Account settings and find the Tracking section. That’s our spot.
Step 2: Configuring the Tracking Template
In the Tracking section, you’ll see the Tracking template field, which dictates how parameters get tacked onto your final URLs. Your default probably looks like `{lpurl}?utm_source=google&utm_medium=cpc…` and so on. To get this ready for AI search, we have to add our own custom parameters with a consistent naming scheme. I’ve found a good starting point is to add `&utm_ai_source={ifsearch:aisearch}{ifcontent:aidisplay}` and `&utm_ai_query={search_term}`. This setup uses Google’s macros to conditionally tag the source based on whether it came from a search or display AI interface, while `utm_ai_query` grabs the user’s prompt. Your finished tracking template will look something like this:
`{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={_campaign}&utm_adgroup={_adgroup}&utm_ai_source={ifsearch:aisearch}{ifcontent:aidisplay}&utm_ai_query={search_term}&utm_content={creative}&utm_term={keyword}`. Pro Tip: Google’s AI stuff, like the Search Generative Experience (SGE) they rolled out in 2023, often blends results together. The ability to tell the difference between a click on a classic SERP link and one inside an AI-generated answer is what this is all about. That `{ifsearch:aisearch}` condition is how you start dissecting that traffic.
Step 3: Testing Your Tracking Template
After you’ve updated the template, use the Test button Google Ads gives you. It’s right there, and it verifies that your URLs are being built correctly. A successful test shows a green checkmark and an example URL with all the parameters properly attached. If you get an error, it’s almost always a misplaced question mark or ampersand, or you just have a typo in a macro. Double-check your syntax. Expected Outcome: Now, all your ad clicks will carry both the standard UTMs and your new AI-specific ones like `utm_ai_source` and `utm_ai_query`, giving you a much richer dataset to analyze in your web analytics.
Implementing AI Tracking in Microsoft Advertising (2026 Interface)
Microsoft Advertising is deeply integrated with Copilot and its other AI products, so it also needs specific parameter adjustments. The logic is the same as in Google Ads, but the interface and the dynamic text macros you use are a bit different.
Step 1: Working through to Account Tracking
Log in to your Microsoft Advertising account. In the top navigation, click Tools, then select Account settings. On the left-hand menu, you’ll see Tracking. Click it.
Step 2: Defining Tracking Template at Account Level
Just like in Google Ads, you have an account-level tracking template here. Find the Tracking template (account) field. The syntax is mostly the same, but Microsoft uses different macros. For AI search, you could use something like this:
`{lpurl}?utm_source=bing&utm_medium=cpc&utm_campaign={Campaign}&utm_adgroup={AdGroup}&utm_ai_source={ifsearch:aisearch}{ifcontent:aidisplay}&utm_ai_query={QueryString}&utm_content={AdId}&utm_term={Keyword}`. Notice it’s `QueryString` instead of `search_term` for the user’s query. Also, `Campaign` and `AdGroup` are capitalized. Because of Microsoft’s AI integration, users might click ads right inside a Copilot summary, and these small distinctions become really important. This isn’t a niche problem, either. A 2025 eMarketer report found that nearly 30% of search queries in the US already involve some form of generative AI interaction. Pro Tip: Microsoft Advertising also lets you set tracking templates at the campaign and ad group levels. If you’re running a campaign specifically targeting AI features, you can override the account-level template with something even more specific for just that campaign, which allows for some really targeted analysis.
Step 3: Validating Your Tracking Setup
Once you’ve entered your template, click Save. Microsoft doesn’t always have a handy “test” button, so validation means doing it the old-fashioned way: create a test ad, click it yourself, and watch your analytics platform to see if the parameters come through. Don’t skip this. A simple typo in a macro can render an entire tracking setup useless, and I’ve seen it happen more times than I can count. Live testing is essential. Expected Outcome: Clicks from your Microsoft Advertising campaigns will now carry the AI-specific parameters, letting you segment data in GA4 and see whether users came from a traditional Bing SERP or an AI-generated summary.
| Feature | Traditional URL Tracking | Google Ads (2026) AI Tracking | Microsoft Advertising (2026) AI Tracking |
|---|---|---|---|
| Standard UTM Parameters | ✓ Yes | ✓ Yes | ✓ Yes |
| Custom AI Source Parameter | ✗ No | ✓ `utm_ai_source` recommended | ✓ `utm_ai_source` recommended |
| Custom AI Query Parameter | ✗ No | ✓ `utm_ai_query` recommended | ✓ `utm_ai_query` recommended |
| Specific AI Macro for Source | ✗ No | ✓ `{ifsearch:aisearch}{ifcontent:aidisplay}` | ✓ `{ifsearch:aisearch}{ifcontent:aidisplay}` |
| Specific Macro for User Query | ✓ `{search_term}` (traditional) | ✓ `{search_term}` | ✓ `{QueryString}` |
| Account-Level Tracking Template | ✓ Yes | ✓ Yes | ✓ Yes |
| Campaign/Ad Group Level Overrides | ✗ No | ✗ No (implied account-level focus) | ✓ Yes (for granular analysis) |
“In 2025, nearly a third of Gen Z consumers (31%) defaulted to chatbots or AI to find information online, according to HubSpot’s 2025 AI Trends for Marketers report, and it’s clear that AI search is growing, rapidly.”
Configuring Google Analytics 4 (GA4) for AI Search Parameters
Collecting the data is the first step, but now you have to tell GA4 what to do with it. GA4 won’t automatically report on your new AI parameters until you create custom dimensions.
Step 1: Accessing Custom Definitions in GA4
Get into your Google Analytics 4 property. Click the Admin gear icon in the bottom left, and under the Property column, find and click on Custom definitions.
Step 2: Creating Custom Dimensions for AI Parameters
You’re going to create two new custom dimensions, one for `utm_ai_source` and another for `utm_ai_query`.
- Click the Create custom dimensions button.
- For `utm_ai_source`:
- Dimension name: AI Source (or whatever you’ll remember)
- Scope: Event (this is for parameters tied to specific events like a page view)
- Description: Identifies traffic from AI search interfaces
- User property: This part is key. Enter `utm_ai_source`. GA4 knows to look for a URL parameter with this name.
- Click Save.
- Do it again for `utm_ai_query`:
- Dimension name: AI Query
- Scope: Event
- Description: The user’s prompt from AI search
- User property: Enter `utm_ai_query`.
- Click Save.
Pro Tip: Don’t be tempted to just cram this AI data into existing parameters like `utm_content`. While you technically can, creating dedicated custom dimensions gives you much cleaner reporting. I’ve found that overloading the standard UTMs just leads to messy reports and people making bad decisions based on confusing data.
Step 3: Verifying Data Collection
It can take a few hours for data to show up after you create custom dimensions. The quickest way to check if it’s working is to go to the Realtime reports in GA4. Click one of your own ads with the new parameters, and you should see a `page_view` event fire with your new custom dimensions attached. For historical data, wait a day, then go to Reports > Engagement > Events, click on the `page_view` event, and add your “AI Source” or “AI Query” as a secondary dimension to see the data flowing in. Common Mistake: Forgetting to set the scope to “Event.” A lot of people set it to “User” by mistake, but for URL parameters that change with each session, it has to be “Event” or you’ll get no data. Expected Outcome: Your GA4 reports will now let you segment your traffic and conversions by “AI Source” and “AI Query.” This means you can finally make a direct comparison of conversion rates, engagement, and user paths for traffic coming from AI search versus traditional search.
Auditing and Iterating Your AI Search Tracking
AI search is changing so fast that this can’t be a set-it-and-forget-it task. You have to audit and update your tracking setup regularly.
Step 1: Monthly Parameter Audit
Put a recurring reminder in your calendar to review your tracking templates in Google Ads, Microsoft Advertising, and anywhere else you run ads. You’re looking for a few things:
- Syntax errors: A single missing ampersand or a typo in a macro will break everything.
- New platform features: The ad platforms are constantly adding new dynamic parameters. For example, Google Ads added `{ai_interaction_type}` in late 2025, which tells you if a click came from a generative summary or a normal ad. You have to watch for these and add them to your templates.
- Data consistency: Make sure the values you chose for `utm_ai_source` are still being used consistently across every single platform. If they’re not, your GA4 reports will be a fragmented mess.
Step 2: Analyzing AI Search Performance
In GA4, start building custom reports using your new “AI Source” and “AI Query” dimensions. Are you asking the right questions?
- Conversion Rates: How do conversions for `utm_ai_source=aisearch` actually compare to your standard `utm_source=google` traffic? Is the quality better or worse?
- Engagement Metrics: Check out the session duration and bounce rate for AI-sourced traffic. This tells you a lot about user intent.
- Top AI Queries: What are the actual prompts that people are typing into AI that lead them to your site? This is gold for your content and ad copy strategy.
Pro Tip: Don’t just look at the high-level numbers. If your platform supports it, segment by the different AI interaction types. A user clicking your ad in an AI-generated shopping list has a very different intent from someone who clicks after a long research query. The IAB’s 2026 report on AI-driven advertising attribution shows just how much these little differences can affect what a user does after they click.
Step 3: Adapting Strategy Based on Insights
All this tracking is pointless unless you act on the data. If you discover that traffic from AI search converts at a lower rate but brings in a higher average order value, then you should probably adjust your bidding strategy for those placements. If you find that certain AI queries are a goldmine for high-value conversions, you can rewrite your ad copy to better align with those specific prompts. This cycle of tracking, analyzing, and adapting is what will separate effective marketers from those operating on last year’s assumptions. Evolving your URL tracking for AI search is a strategic necessity. Getting your parameters right, setting up your analytics properly, and constantly auditing your work is how you ensure your marketing budget is accurately attributed and optimized for the future of search. As the field evolves, even AI Agents may start playing a role in solving the paid click problems this new environment creates.
Why are new URL parameters necessary for AI search?
Because your standard UTM parameters can’t tell you if a click came from a regular search results page or from inside an AI-generated answer. New parameters like utm_ai_source let you isolate that AI traffic, segment it, and analyze how those users behave, since their intent is often completely different from a traditional searcher.
Can I use existing UTM parameters for AI search tracking?
You could, but it’s a bad idea. Shoving AI-specific values into existing parameters like utm_source just pollutes your data and makes it a nightmare to compare performance between traditional and AI search. Creating new, dedicated parameters is the only way to keep your data clean and make analysis straightforward.
What are the most important AI-specific parameters to implement?
At minimum, you need a parameter to identify the AI source (like utm_ai_source=aisearch) and one to capture the user’s prompt in the AI interface (like utm_ai_query={search_term}). Some platforms are now offering even more valuable parameters that can identify the specific type of AI interaction, and you should definitely use them if you can get them.
How long does it take for custom dimensions in GA4 to show data?
After you create custom dimensions in GA4, data usually starts appearing in the Realtime report pretty quickly, but you should allow up to 24 hours for it to be fully processed and visible in all your standard reports. Don’t panic if you don’t see it all in the first hour.
What is the biggest challenge in tracking AI search traffic?
The biggest challenge is how quickly everything is changing. The ad platforms are constantly updating their AI interfaces and how ads get served which means you have to be vigilant, regularly audit your tracking, and adapt to new macros and features. Just keeping your tracking consistent across Google, Microsoft, and other platforms is a significant challenge in itself.