First-party Site Tracking

Install AEO Goal's first-party tracking tag to connect AI referrals with conversions and revenue.

Last updated November 18, 2026

First-party Site Tracking connects visits from AI assistants, search engines, and advertising campaigns to conversions and revenue. It is independent of GA4: the browser tag sends events directly to AEO Goal’s write-only collection endpoint.

Before you start

You need:

  • An AEO Goal brand with the correct primary domain.
  • Permission to edit the site’s global HTML, CMS header, or tag manager.
  • A consent decision for your jurisdiction and visitor audience.
  • A stable conversion ID from your checkout or backend, such as an order ID.

Install the site-wide tag

  1. Open App → Site Tracking for the brand.
  2. Copy the generated site-wide tag.
  3. Add it to the global <head> or equivalent site-wide tag-manager container. Do not paste it only on the home page.
  4. Publish the site or tag-manager container.
  5. In AEO Goal, add the site’s allowed origin if the site uses a separate checkout or domain. Origins are hostnames, not paths.
  6. Confirm that Site Tracking is enabled.

The generated tag looks like this; use the key and API origin shown in your account rather than copying these example values:

<script>window.aeo=window.aeo||function(){(aeo.q=aeo.q||[]).push(arguments)};</script>
<script async src="https://app.aeogoal.com/t/v1.js"
  data-aeo-key="aeo_pk_your_brand_key"
  data-aeo-api="https://api.aeogoal.com"></script>

The tag is safe to load asynchronously. It uses sendBeacon when available and a keepalive request as a fallback, so it should not block navigation.

If consent is required, select the consent-required option before copying the tag. The generated tag includes data-aeo-consent="required". Nothing is sent and no durable visitor cookie is written until your consent banner calls:

aeo('consent', true);

Call this only after the visitor has accepted the category of tracking that covers attribution analytics. If consent is denied, do not call it. Confirm the correct legal basis and retention policy with your privacy advisor; AEO Goal does not determine your legal obligations.

Record conversions

Put the conversion call on the order-confirmation, lead-confirmation, or equivalent success path. Use a stable ID generated by the transaction system, not a random value generated on every page load:

aeo('conversion', {
  id: 'ORDER-1001',
  value: 129.50,
  currency: 'EUR',
  email: 'buyer@example.com'
});

id makes retries idempotent. value and currency allow net revenue reporting. Email and phone are optional matching signals and are hashed in the browser; never put raw values in URLs or logs. For subscriptions, send the business event your team has defined as the conversion and keep its ID stable across retries.

What is measured

The tracker can capture:

  • One or more consented visitor touches, with a first-party visitor ID.
  • Landing URL and external referrer, excluding internal navigation as a referral.
  • UTM campaign fields and advertising click IDs such as gclid, gbraid, wbraid, msclkid, fbclid, ttclid, li_fat_id, and rdt_cid.
  • AI-engine classification for recognized assistant referrers or AI campaign tags.
  • Conversion event name, stable event ID, value, currency, and optional hashed match signals.
  • Refund events, which reduce net revenue and do not count as new conversions.
  • AI referral sessions, conversions, net revenue, observed/modelled attribution, AI landing pages, and Share of Mind correlation in the report.

The tracker does not read arbitrary page content, record keystrokes, fingerprint visitors, or require GA4. Bots are flagged and excluded from AI referral performance. Hashes are still personal data under GDPR and remain subject to your retention and erasure policy.

Verify the installation

Use this checklist in a test environment or with a clearly marked test order:

  1. Open a page on the allowed origin with the browser developer tools Network panel open.
  2. Confirm a POST /api/collect/touch request is sent after the page loads.
  3. Confirm the response is successful and the Site Tracking event count increases.
  4. Submit one test conversion with a unique ID, for example TEST-ORDER-2026-11-18-001.
  5. Confirm POST /api/collect/conversion succeeds and the conversion appears in the AI attribution report when the test touch was classified as AI traffic.
  6. Repeat the same conversion ID and confirm it is not counted twice.
  7. Remove or erase test data according to your data policy.

If collection is rejected, check the public key, Site Tracking enablement, the request Origin, allowed origins, active plan/rollout, and the site’s daily event cap. Collection is intentionally write-only: the public key cannot read attribution data.

Site Tracking can expose eligible Google-click conversions through a scheduled HTTPS CSV feed:

  1. Open App → Site Tracking → Google Ads feed.
  2. Issue credentials and copy the password immediately; it is shown once.
  3. In Google Ads, create or select matching conversion actions and configure a scheduled HTTPS upload using the feed URL and HTTP Basic credentials.
  4. Enable ad-platform sharing in AEO Goal.
  5. Check the feed status and last-fetch time after Google’s first scheduled pull.

The feed includes conversions matched to a gclid, gbraid, or wbraid recorded before conversion, within the supported 90-day window. It does not expose feed credentials through MCP or normal status responses. Revoke and reissue credentials if they are lost.

MCP access

Agents with platform:read access can query:

  • get_ai_referral_performance
  • get_conversion_attribution
  • get_revenue_by_ai_engine
  • get_ai_conversion_dead_ends
  • get_google_ads_feed_status

These tools are read-only, brand-scoped, and use the same first-party ledger and feed status shown in the app.

Frequently asked questions

Do I need Google Analytics 4?

No. Site Tracking writes directly to AEO Goal's first-party attribution ledger. GA4 remains a separate integration and is not required for these reports.

What does Site Tracking measure?

It records consented visitor touches, landing URL, external referrer, campaign parameters, advertising click IDs, AI-engine classification, conversion events, conversion value and currency, refunds, and the resulting attribution report.

Does the tracker store email addresses or phone numbers?

No. Email and phone values are normalized and SHA-256 hashed in the browser before they are sent. Raw values are rejected by the collection API.

How do I verify installation?

Load a page on the allowed website, check the Site Tracking event count, and submit one test conversion with a unique test ID. Then confirm the event in the attribution report and erase the test visitor if required by your data policy.