Adding llms.txt and AI-referrer tracking gives me two measurable things: requests for a file, if hosting logs are available, and browser visits carrying a recognizable referrer. Neither proves that an AI system recommends my site more often.

That distinction matters because “generative engine optimization” can turn a small infrastructure change into an unsupported growth claim. My aim was narrower: make a static site easier to navigate programmatically and make the traffic I can observe easier to inspect.

What llms.txt actually contributes

The project is a Vietnam airport arrival guide. It covers practical questions about immigration, airport assistance, and booking. That creates a useful engineering constraint: an answer should connect to a specific page with relevant details.

llms.txt provides a compact entry point: a site description, context, and a curated list of useful resources. The llms.txt proposal describes a Markdown format for helping agents use websites.

I treat it as another published interface. Its checks are straightforward:

  • Does /llms.txt return HTTP 200?
  • Is the response readable text rather than the application’s HTML fallback?
  • Do its links resolve?
  • Does its summary agree with the pages it references?

Those checks establish availability and consistency. They do not establish adoption by any particular assistant, indexing, citation, or ranking improvement.

A request in an access log establishes that something fetched the file. Even an identifiable crawler does not establish what happened afterward.

Annotating AI referrals in GA4

The browser-side instrumentation answers a different question: did someone arrive with a recognizable AI-service referrer?

Here is the core classification pattern:

const providers = new Map([ ["chatgpt.com", "chatgpt"], ["perplexity.ai", "perplexity"], ["claude.ai", "claude"] ]); function classifyReferrer(referrer) { try { return providers.get(new URL(referrer).hostname) ?? null; } catch { return null; } } 

An explicit hostname allowlist avoids substring mistakes such as matching chatgpt.com.example.org. It also makes coverage inspectable: this example recognizes exactly three hosts. Additional hosts require deliberate rules.

For a matching external arrival, a custom event can carry ai_provider and landing_path. Here, “annotation” means labeling an observation with event parameters; it is separate from a dated reporting annotation.

GA4 already provides acquisition reporting. The custom event adds a convenient inspection layer without rewriting the original source or medium. Google’s event-parameter documentation explains both DebugView inspection and registering custom dimensions for reporting.

Run classification after the applicable consent decision, before navigation loses the incoming context. Avoid recording full referrer query strings: they add little analytical value and can contain sensitive information.

What the numbers would mean

I do not have a verified production analytics export to present here, so I cannot honestly report an uplift.

The reporting contract is still concrete:

  • Recognized arrival events measure observed landings, not necessarily unique people.
  • Sessions grouped by source measure attributed visits.
  • Outbound booking clicks measure an action on the guide.
  • Confirmed bookings require evidence from the booking system.

For example, 8 booking clicks from 40 recognized sessions would be a 20% click-through rate. Those are illustrative numbers, not results from this site.

The cross-domain boundary matters. A reader opening the Noi Bai service page leaves the guide’s domain. An outbound click alone cannot confirm a booking.

Likewise, utm_source=devto labels this article’s campaign traffic. It does not demonstrate AI discovery.

The remaining blind spots

An answer without a click produces no browser visit. Apps, redirects, and referrer policies can remove attribution. Analytics blockers create further gaps. Missing referrals therefore mean missing observations, not necessarily missing exposure.

My next engineering step is to validate event delivery, exclude test traffic, and compare equivalent reporting windows while recording deployment dates. Any change remains an association until there is stronger evidence of causation.

If you are planning an arrival and want to check availability, you can review the booking options. There is no prepayment: you pay your agent on the day.