> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asva-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Surface Hidden AI Commerce Traffic with Asva Attribution

> AI assistants strip referrer headers, making AI-sourced visits appear as Direct in GA4. Learn how Asva identifies and surfaces that hidden traffic.

When a shopper asks ChatGPT "what running shoes should I buy?" and clicks through to your store, that session arrives with no referrer and no UTM parameters. GA4 logs it as Direct. It is not direct — it is AI-driven commerce, and it converts at 15.9% compared to 1.76% from Google Organic. The gap between what GA4 shows you and what is actually driving your revenue is called **dark agentic traffic**, and it grows every month as AI assistants become the default starting point for product discovery.

## Why AI traffic loses its referrer

Several distinct mechanisms cause AI-sourced visits to arrive without attribution signals. Understanding them helps you appreciate why no simple UTM rule fixes the problem.

| Cause                 | What happens                                                                     |
| --------------------- | -------------------------------------------------------------------------------- |
| Server-side requests  | AI agents fetch pages server-side; no browser referrer header is ever set        |
| Referrer stripping    | ChatGPT, Perplexity, and others deliberately strip or omit `Referer` headers     |
| Click proxy           | Clicks through AI chat interfaces pass through a proxy that removes the referrer |
| No UTM parameters     | AI surfaces do not append UTM params to outbound links                           |
| HTTPS → HTTP redirect | Referrer is dropped whenever a redirect crosses protocol boundaries              |

## What dark traffic looks like before and after Asva

Without attribution, a meaningful share of your Direct channel is actually AI Commerce. Here is a representative before-and-after for a mid-size DTC brand:

<Tabs>
  <Tab title="Before Asva">
    ```
    Direct          34%   ← includes ~17% misattributed AI traffic
    Organic Search  28%
    Paid Search     22%
    Email            9%
    Social           7%
    ```
  </Tab>

  <Tab title="After Asva">
    ```
    Direct          17%   ← actual direct (bookmarks, typed URLs)
    Organic Search  28%
    Paid Search     22%
    AI Commerce     17%   ← previously invisible
    Email            9%
    Social           7%
    ```
  </Tab>
</Tabs>

The Direct channel drops by half. A brand-new top-five channel appears — one that was already converting at multiples of paid search.

## How Asva identifies AI-sourced sessions

Asva's attribution engine combines multiple signals to classify a session. No single signal is reliable on its own, so Asva weights them together and assigns a confidence score.

<CardGroup cols={2}>
  <Card title="Session fingerprinting" icon="fingerprint">
    Timing and behavioral patterns differ measurably between AI-referred visits and organic direct visits.
  </Card>

  <Card title="Landing page signals" icon="map-pin">
    AI surfaces almost always deep-link to a specific product or category page, not the homepage.
  </Card>

  <Card title="UTM fallback" icon="tag">
    When an AI surface does pass partial UTM data (e.g. `utm_medium=ai`), Asva captures and normalizes it.
  </Card>

  <Card title="Known referrer domains" icon="link">
    Recognized AI referrer domains — `chatgpt.com`, `gemini.google.com`, `perplexity.ai` — are classified at high confidence when the header is present.
  </Card>
</CardGroup>

<Note>
  Attribution is probabilistic for sessions with no referrer signal. Asva applies a confidence score to each classified session. Sessions below the confidence threshold are reported separately so you can review them. See [How Asva's Attribution Model Works](/attribution/model) for full details.
</Note>

## What you can measure after installation

Once the snippet is live, Asva surfaces the following in your dashboard and in GA4:

* **AI Commerce channel** — a new named channel alongside Organic, Paid, and Direct
* **Per-surface attribution** — traffic broken down by ChatGPT, Gemini, Perplexity, and others where the referrer is detectable
* **Product-level AI traffic** — which products AI assistants recommend most
* **AI-sourced revenue** — conversion rate and revenue attributed to AI sessions
* **Month-over-month trend** — whether your AI traffic share is growing

## Install the attribution snippet

Add the Asva snippet to your storefront `<head>` before any other analytics tags.

<Steps>
  <Step title="Copy the snippet">
    ```html theme={null}
    <!-- Asva AI Dark Traffic Attribution -->
    <script>
      (function(w,d,s,l,i){w[l]=w[l]||[];
      w[l].push({'asva.start': new Date().getTime(), event:'asva.js'});
      var f=d.getElementsByTagName(s)[0],
      j=d.createElement(s),dl=l!='asvaLayer'?'&l='+l:'';
      j.async=true;j.src='https://cdn.asva-ai.com/attribution.js?id='+i+dl;
      f.parentNode.insertBefore(j,f);
      })(window,document,'script','asvaLayer','YOUR_PROPERTY_ID');
    </script>
    ```
  </Step>

  <Step title="Replace YOUR_PROPERTY_ID">
    Find your Property ID in your Asva dashboard under **Settings → Property**. Replace `YOUR_PROPERTY_ID` in the snippet with that value.
  </Step>

  <Step title="Place it in your storefront">
    Paste the snippet inside the `<head>` tag on every page of your storefront. For platform-specific placement, see the tabs below.

    <Tabs>
      <Tab title="Shopify">
        Go to **Online Store → Themes → Edit code → `theme.liquid`** and paste the snippet inside the `<head>` block.
      </Tab>

      <Tab title="Google Tag Manager">
        Go to **Tags → New → Custom HTML**, paste the snippet, set the trigger to **All Pages**, then publish.
      </Tab>

      <Tab title="Other platforms">
        Add the snippet to your global layout template, inside the `<head>` element, before the closing `</head>` tag.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify the snippet fires">
    Open your browser console on any page of your store and run:

    ```javascript theme={null}
    console.log(window.asvaLayer)
    ```

    You should see the `asvaLayer` array initialised. If you arrived from a link shared through a ChatGPT conversation, you will also see `ai_source` and `is_ai_session` populated.
  </Step>
</Steps>

<Warning>
  Place the snippet in `<head>`, not before `</body>`. Asva must capture the referrer context on page load, before any navigation events fire. Loading it at the bottom of the page can cause the first-touch referrer to be missed.
</Warning>

## Privacy and compliance

Asva's attribution does not rely on third-party cookies. All session classification is:

* Performed server-side on first-party data
* Free of personally identifiable information (PII)
* Compliant with GDPR, CCPA, and equivalent regulations

## Next steps

<CardGroup cols={2}>
  <Card title="GA4 Integration" icon="chart-line" href="/attribution/ga4-integration">
    Create custom dimensions and channel grouping rules so AI Commerce appears as a named channel in GA4.
  </Card>

  <Card title="How Asva's Attribution Model Works" icon="diagram-project" href="/attribution/model">
    Understand the signal tiers, confidence thresholds, and attribution windows Asva uses to classify sessions.
  </Card>
</CardGroup>
