# AotterTrek — Full developer docs
https://trek-staging.aotter.workers.dev/en/docs · 2026-12-02
## Setup instructions for your AI
```
Please connect this project to AotterTrek ads and data.
1. Connect to Trek at https://trek-staging.aotter.workers.dev/mcp. The first time, a browser window opens so I can sign in with my Aotter account and approve access.
2. Check my account status and next step (get_onboarding_status).
3. Identify this project's domain (for an app: the App Store ID on iOS or the package name on Android; an app not in its store yet registers with listing 'unlisted', iOS by bundle ID) and framework. Check whether it is already registered (list_assets); register it only if not (create_asset). If the reply asks for a Trek organisation first, or says the linked organisation has no sites or apps, list the organisations (list_trek_orgs), let me choose, then link it (link_trek_org) instead of registering straight away.
4. Create placements that fit the pages (create_placement), with formats and sizes from get_sdk_capabilities: on websites, a native multimedia ad (300x250 or 336x280) inside article content plus an optional sticky bottom banner site-wide (for example 320x50); in apps, native or native multimedia ads.
5. Get the install guide (get_integration_skill). The reply points to the SDK skills in aotter/skills: run npx skills add aotter/skills in the project first, then install with the skills the reply lists. Use the test keys in the reply in development.
6. Get the public keys (list_integration_keys), add them to the project's environment variables with the framework's public prefix (e.g. NEXT_PUBLIC_ or VITE_), and add the ads.txt line at the site root. After deploying, verify ownership (verify_asset) if the asset was created in Trek.
7. Build and open the page, confirm the ad space is reserved and nothing else changed, then check the install (verify_integration) and report the full result to me.
Rules:
- Never put tokens, passwords or secrets in files, commits or chat.
- Only change code related to ads.
- Ask me when unsure; if a write's result is unclear, check first instead of retrying.
```
## Developer docs
URL: https://trek-staging.aotter.workers.dev/en/docs
Add AotterTrek ads and data to your software — with your AI or by hand.
5-minute quickstartSign up, hand off to AI, go live (https://trek-staging.aotter.workers.dev/en/docs/quickstart)
MCP serverEndpoint, auth and 21 tools (https://trek-staging.aotter.workers.dev/en/docs/mcp)
Trek SDK overviewWeb, iOS, Android, Flutter and what's next (https://trek-staging.aotter.workers.dev/en/docs/sdk)
MediationAdMob · Google Ad Manager · AppLovin MAX (https://trek-staging.aotter.workers.dev/en/docs/mediation)
Third parties & verificationPrebid · OM SDK · UID2 (https://trek-staging.aotter.workers.dev/en/docs/partners)
ads.txt / app-ads.txtAuthorised sellers and ownership (https://trek-staging.aotter.workers.dev/en/docs/ads-txt)
ReportingMetric definitions and data maturity (https://trek-staging.aotter.workers.dev/en/docs/reporting)
Security modelWhat may go in your project — and what never does (https://trek-staging.aotter.workers.dev/en/docs/security)
SDK changelogSynced daily (https://trek-staging.aotter.workers.dev/en/changelog)
For AI readersThe docs also come in a plain-text version for AI: an index (https://trek-staging.aotter.workers.dev/en/llms.txt) and the full text (https://trek-staging.aotter.workers.dev/en/llms-full.txt). Give the link to your AI and it can read them directly.
### Key concepts
| Term | Meaning | Public? |
| Trek organisation | Your billing and permission unit, created at sign-up. | — |
| Asset | A site domain, an iOS app (registered by App Store ID; before it is in the App Store, by bundle ID, adding the App Store ID once listed) or an Android package name, each with one clientId. An app not in its store yet serves test ads only. | — |
| clientId | Identifier used to initialise the SDK, bound to the asset's domain or app. | Yes |
| Placement | Where an ad appears and in what format, each with one placeUid. | — |
| placeUid | The placement ID used when requesting an ad. | Yes |
| Trek credentials | Used by the dashboard to call Trek on your behalf; server-side only. | Never |
## 5-minute quickstart
URL: https://trek-staging.aotter.workers.dev/en/docs/quickstart
Let your AI request keys, install the SDK, set up ads.txt and run the checks.
### 1. Create an account
Go to sign in (https://trek-staging.aotter.workers.dev/sign-in?return=/app) with your Aotter account. On first sign-in your Trek organisation is created and you land on "Get started" in the dashboard.
### 2. Add Trek to your AI tool
#### Claude Code
Run this in your project folder, then type /mcp in the chat to sign in.
```
claude mcp add --transport http trek https://trek-staging.aotter.workers.dev/mcp
```
#### Cursor
Add this file (or Settings → MCP → Add), then click Login. .cursor/mcp.json
```
{
"mcpServers": {
"trek": {
"url": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
```
#### Codex
Add to your config, then run codex mcp login trek. ~/.codex/config.toml
```
[mcp_servers.trek]
url = "https://trek-staging.aotter.workers.dev/mcp"
```
#### VS Code / Copilot
Add this file and enable it in Copilot Chat agent mode. .vscode/mcp.json
```
{
"servers": {
"trek": {
"type": "http",
"url": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
```
#### Windsurf
Add to the config file, then refresh. ~/.codeium/windsurf/mcp_config.json
```
{
"mcpServers": {
"trek": {
"serverUrl": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
```
#### Gemini CLI
Add to settings, then run /mcp auth trek. ~/.gemini/settings.json
```
{
"mcpServers": {
"trek": {
"httpUrl": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
```
#### ChatGPT / Claude.ai
Go to Settings → Connectors → Add custom connector, paste the URL and sign in with Aotter.
```
https://trek-staging.aotter.workers.dev/mcp
```
### 3. Give your AI these instructions
```
Please connect this project to AotterTrek ads and data.
1. Connect to Trek at https://trek-staging.aotter.workers.dev/mcp. The first time, a browser window opens so I can sign in with my Aotter account and approve access.
2. Check my account status and next step (get_onboarding_status).
3. Identify this project's domain (for an app: the App Store ID on iOS or the package name on Android; an app not in its store yet registers with listing 'unlisted', iOS by bundle ID) and framework. Check whether it is already registered (list_assets); register it only if not (create_asset). If the reply asks for a Trek organisation first, or says the linked organisation has no sites or apps, list the organisations (list_trek_orgs), let me choose, then link it (link_trek_org) instead of registering straight away.
4. Create placements that fit the pages (create_placement), with formats and sizes from get_sdk_capabilities: on websites, a native multimedia ad (300x250 or 336x280) inside article content plus an optional sticky bottom banner site-wide (for example 320x50); in apps, native or native multimedia ads.
5. Get the install guide (get_integration_skill). The reply points to the SDK skills in aotter/skills: run npx skills add aotter/skills in the project first, then install with the skills the reply lists. Use the test keys in the reply in development.
6. Get the public keys (list_integration_keys), add them to the project's environment variables with the framework's public prefix (e.g. NEXT_PUBLIC_ or VITE_), and add the ads.txt line at the site root. After deploying, verify ownership (verify_asset) if the asset was created in Trek.
7. Build and open the page, confirm the ad space is reserved and nothing else changed, then check the install (verify_integration) and report the full result to me.
Rules:
- Never put tokens, passwords or secrets in files, commits or chat.
- Only change code related to ads.
- Ask me when unsure; if a write's result is unclear, check first instead of retrying.
```
### 4. Check the install
Once deployed, paste a URL into the quick check (https://trek-staging.aotter.workers.dev/en#verify) or call the public API:
```
curl "https://trek-staging.aotter.workers.dev/api/public/verify?url=https://your-site.com/article"
```
It checks the SDK, clientId, placeUid, ads.txt and whether test keys are still in use. Signed in, the dashboard or verify_integration shows the four-stage status.
The public API is rate limited to about 10 calls a minute per IP; this is approximate, not an exact quota. Beyond it the API answers 429 (RATE_LIMITED) — try again in a minute.
### Tool can't connect directly?
For Lovable, Bolt, v0 and similar tools, copy your public keys from "Placements & keys" and give them to your AI with the Web SDK example (https://trek-staging.aotter.workers.dev/en/docs/web). Or install it yourself with the SDK docs (https://trek-staging.aotter.workers.dev/en/docs/sdk).
## MCP server
URL: https://trek-staging.aotter.workers.dev/en/docs/mcp
Streamable HTTP · OAuth 2.1 + PKCE · only your own data.
### Endpoint
```
https://trek-staging.aotter.workers.dev/mcp
```
| Item | Details |
| Transport | Streamable HTTP |
| Auth | OAuth 2.1 authorization code + PKCE (S256), dynamic registration and Client ID Metadata Documents |
| Scopes | mcp, offline_access |
| Consent | A browser opens on first connection to sign in with Aotter and approve |
| Revoke | Dashboard → “AI & MCP” → “Authorised AI tools”, one tool at a time (signing out does not revoke) |
### Tools
| Tool | Purpose | Type |
| get_onboarding_status | Account, Trek organisation and next step | Read |
| list_assets | List your sites and apps; with Trek connected, the selected Trek organisation's apps are read from Trek at that moment | Read |
| list_placements | List ad placements; with Trek connected, places and their state are read from Trek at that moment | Read |
| list_trek_orgs | List the Trek organisations you belong to | Read |
| link_trek_org | Choose the Trek organisation whose assets are listed and new assets are created in | Write |
| create_asset | Register a site (domain) or app (App Store ID for iOS, package name for Android; bundle ID for an iOS app not in the App Store yet) | Write |
| report_asset_listing | Report that an app is now in its store (iOS with its App Store ID); app-ads.txt can be verified after that | Write |
| update_asset | Rename an asset or change its category | Write |
| verify_asset | Ask Trek to check ads.txt and verify ownership | Write |
| get_sdk_capabilities | SDK versions, formats and sizes per platform (from the official install docs) | Read |
| create_placement | Create a placement per the SDK docs: native multimedia or banner on websites; native, native multimedia or banner in apps | Write |
| set_placement_state | Pause or resume a Trek placement | Write |
| get_integration_skill | Get the install guide and keys: the aotter/skills SDK skills to use and this placement's keys | Read |
| list_integration_keys | Get public keys (clientId, placeUid) and ads.txt | Read |
| verify_integration | Check the install in four stages | Read |
| get_revenue_report | Impressions, clicks, eCPM, fill rate and estimated revenue | Read |
| get_payee_info | View the linked organisation's payee details (personal data masked by AotterTrek) | Read |
| update_payee_info | Change the text fields of the linked organisation's payee details (send only what changes; images never pass through MCP and are uploaded in the dashboard) | Write |
| get_wallet | View the linked organisation's wallet: amount available, balance, open payout requests, the minimum payout and why a payout cannot be requested now (payouts are requested in the dashboard only, never through MCP) | Read |
| list_payout_requests | List the linked organisation's payout requests: status, amount, adjustments, amount paid and pay date | Read |
| connections | List GAM, AdMob, AdSense and other sources | Read |
### Recommended order
```
get_onboarding_status
sites # reuse if it already exists
create_asset { label, identifier, platform: "web"|"ios"|"android", category }
get_sdk_capabilities { platform } # formats and sizes from the SDK docs
create_placement { siteid, name: "article_inline", format: "supr_ad", size: "300x250" }
get_integration_skill { placementid } # the aotter/skills skills to use and this placement's keys
list_integration_keys { siteid } # public IDs, ads.txt, .env snippet
verify_integration { siteid, url }
```
### Errors
- TREK_REAUTH_REQUIRED: your AotterTrek authorization is no longer valid: it is older than 30 days, or you signed out of the dashboard somewhere (signing out also disconnects your connected AI tools). Open /sign-in (https://trek-staging.aotter.workers.dev/sign-in) in a browser, sign in again, then retry.
- CONFLICT: the platform and identifier, or the placement name, already exist. Read and reuse.
- NOT_FOUND: the resource doesn't exist or isn't yours.
- If a write's result is unclear (timeout, disconnect), read first — don't retry blindly.
Current statusThe Trek organisation, credentials, production keys and reports are currently mock or sample data (marked mode: "mock" | "demo"); assets and placements are stored for real. See API status (https://trek-staging.aotter.workers.dev/en/docs/status).
## WebMCP
URL: https://trek-staging.aotter.workers.dev/en/docs/webmcp
Let in-browser AI use the tools Trek pages provide.
WebMCP is a W3C WebML Community Group draft: pages offer tools to in-browser AI with document.modelContext.registerTool(). Early implementations used navigator.modelContext; Trek supports both.
### Public pages
| Tool | Description |
| trek_get_quickstart | MCP endpoint, per-tool setup and instructions (read-only) |
| trek_search_docs | Search the docs (read-only) |
| trek_open_signup | Open sign-in; the person signs in themselves |
### Dashboard (signed in)
| Tool | Description |
| trek_get_context | Current page, organisation and next step |
| trek_navigate | Switch dashboard page (same site only) |
| trek_list_assets | List assets and placements |
| trek_create_asset | Register a site or app |
| trek_create_placement | Create a placement |
| trek_get_keys | Get public keys and ads.txt |
| trek_revenue_summary | Revenue summary (sample data) |
Every call uses your current session and is re-authorised by the server — exactly like pressing the button yourself.
## Trek SDK overview
URL: https://trek-staging.aotter.workers.dev/en/docs/sdk
Where each platform stands today, and the next-generation SDK designed for the AI era.
### Platforms
| Platform | Install | IDs | Docs |
| Web | static.aottercdn.com/trek/sdk/3.5.8/sdk.js | clientId · placeUid | Web (https://trek-staging.aotter.workers.dev/en/docs/web) |
| iOS 15+ | SPM AotterTrekSDK-iOS 5.x · CocoaPods | clientId · placeID | iOS (https://trek-staging.aotter.workers.dev/en/docs/ios) |
| Android | Gradle com.aotter.android:trek-ads | clientId · placeUid | Android (https://trek-staging.aotter.workers.dev/en/docs/android) |
| Flutter | pub trek_gma_mediation (via Google Mobile Ads mediation) | AdMob ad unit + custom event | Flutter (https://trek-staging.aotter.workers.dev/en/docs/flutter) |
### Next-generation SDK (proposal)
ProposalThis interface design for the SDK team (issue 07) is not released yet. Use the current SDKs for now.
Three goals: an AI can install it correctly in three lines, the front end never touches a secret, and one config covers Trek, mediation and third-party demand.
```
// npm i @aotter/trek (proposal)
import { Trek } from '@aotter/trek';
Trek.init({ clientId: import.meta.env.VITE_TREK_CLIENT_ID }); // switches to test keys on localhost / previews
// // Web Component for React, Vue, Svelte…
```
#### Principles
- One name, one way:consistently clientId / placeUid, placement names accepted; banners no longer borrow the suprAd command.
- Safe by default:public IDs only in the front end; clientId bound server-side to a domain or app; test keys in development automatically.
- Good UX by default:reserved height (no layout shift), lazy loading, automatic clean-up on SPA navigation.
- Machine-checkable:Trek.diagnose() returns the same four stages as verify_integration.
- Consent & privacy:Trek.consent({ tcf, gpp }); Trek.setUser() accepts hashed values only.
- Pluggable demand & verification:Trek.use(adapter) adds third-party networks, header bidding and verification — see third parties (https://trek-staging.aotter.workers.dev/en/docs/partners).
```
Trek.use(prebid({ timeout: 800 })); // header bidding (bidder: aseal)
Trek.use(omid()); // IAB Open Measurement (OMSDK_Aotternet ships in the iOS SDK)
Trek.use(uid2({ consent: true })); // identity
const status = await Trek.diagnose(); // { configured, testRequestSeen, productionEligible, productionImpressionSeen }
```
## Web SDK
URL: https://trek-staging.aotter.workers.dev/en/docs/web
HTML; native multimedia ads and banners.
### Install
Place it at the end of
and load it once per page:
```
```
### Native multimedia ad (in-content)
```
```
### Banner (sticky bottom)
```
AotterTrek('suprAd', { selector: '#banner', place: '[Banner PlaceUid]', mobile: true, fixed: 'bottom' });
```
### React · Next.js
To install with AI, run npx skills add aotter/skills in the project; get_integration_skill lists the web skills to use and this placement's keys. The web skills describe a plain HTML page for now; in a framework project such as React or Next.js, the skill first asks where the snippet belongs (aotter/skills#7).
### Test keys
| Item | Value |
| clientId | yEFcFoJaruNorh5RqtuR |
| Banner | f62fc7ee-2629-4977-be97-c92f4ac4ec23 |
| Native Multimedia 300×250 | 5a41c4d0-b268-43b2-9536-d774f46c33bf |
### First-party data (optional)
```
AotterTrek('setUser', { email: '', hashedPhone: '', birthYear: 1990, gender: 'female' });
AotterTrek('send');
```
ConsentSend only after user consent, and only hashed values.
### Prebid
```
pbjs.setConfig({ aseal: { clientId: '[Trek client id]' } });
const adUnits = [{ code: 'div-1', mediaTypes: { banner: { sizes: [[300, 250]] } },
bids: [{ bidder: 'aseal', params: { placeUid: '[PlaceUid]' } }] }];
```
## iOS SDK
URL: https://trek-staging.aotter.workers.dev/en/docs/ios
AotterTrekSDK 5.x · iOS 15+
### Install
#### Swift Package Manager
```
.package(url: "https://github.com/aotter/AotterTrekSDK-iOS", from: "5.0.0")
// product: AotterTrekSDK
```
#### CocoaPods
```
source 'https://github.com/aotter/AotterTrekSpecs-iOS.git'
source 'https://cdn.cocoapods.org/'
pod 'AotterTrekSDK', '~> 5.0'
```
CocoaPods trunktrunk becomes read-only in December 2026 and new versions ship only to Aotter's specs repo, so keep the source line above.
### Initialise
```
AotterTrekSDK.sharedInstance().initSDK("")
```
### Native ads
```
let loader = ATKAdLoader(placeID: "", listener: nil)
loader.delegate = self
loader.load(nil)
func adLoader(_ loader: ATKAdLoader, didReceive ad: ATKNativeAdData) {
adView.nativeAd = ad // ATKNativeAdView containing an ATKMediaView
}
```
Fields: title, text, advertiserName, sponsor, callToAction, imgIcon. The placement decides standard or multimedia native; read it via adType from 5.0.1.
### Banners
```
banner.placeID = ""
banner.rootViewController = self
banner.delegate = self
banner.load(nil)
```
### Parallax creatives
From 5.0.1, call AotterTrekSDK.notifyAdScrolled() in scrollViewDidScroll so parallax creatives move with the page.
### Test keys
| Item | Value |
| clientId | 21tgwWwuzFYiD4ko5Klr |
| Native | bc47b614-7b24-4eb1-aae2-65e8de8e96de |
| Native Multimedia | adcb5212-0453-4594-932a-104be11e521a |
| Banner | 669bad6a-27ec-487a-a583-7b5305732ff7 |
IAB Open Measurement (OMSDK_Aotternet) is built in for third-party viewability.
## Android SDK
URL: https://trek-staging.aotter.workers.dev/en/docs/android
com.aotter.android:trek-ads · minSdk 21
### Install
```
repositories { maven { url 'https://deps.aotter.net/artifactory/libs-release-local' } }
dependencies { implementation 'com.aotter.android:trek-ads:5.6.4' }
```
Requires minSdk 21 (23 with mediation), compileSdk 35, Java 11 and Kotlin 2.2. See the changelog (https://trek-staging.aotter.workers.dev/en/changelog#android) for the latest version.
### Initialise
```
TrekAds.initialize(this, "[Trek client id]", listener)
```
### Native ads
```
val loader = TrekAdLoader.Builder(context, "[PlaceUid]")
.withAdListener(object : TrekAdListener() {
override fun onAdLoaded(trekNativeAd: TrekNativeAd) { /* bind to your layout */ }
}).build()
loader.loadAd(TrekAdRequest.Builder().build()) // several at once: loadAds(), 2–5
```
Use TrekMediaView for multimedia placements.
### Banners
```
trekBannerAdView.setPlaceUid("[PlaceUid]")
trekBannerAdView.loadAd(TrekAdRequest.Builder().setCategory("news").setContentUrl(url).setContentTitle(title).build())
```
Options: autoRefresh, refreshTime (15, 30, 60 s), preload. Example error code: NO_AD = 800.
### Test keys
| Item | Value |
| clientId | DNgNhOwfbUkOqcQFI+uD |
| Native | 45419fb5-a846-4c4a-837f-3b391ec7b45a |
| Native Multimedia | 81608f91-8b2b-4f8f-86a1-539a1959f836 |
| Banner | 68856f90-83b7-4f09-98d4-7f480842cb02 |
## Flutter
URL: https://trek-staging.aotter.workers.dev/en/docs/flutter
trek_gma_mediation 0.1.0: Trek ads via Google Mobile Ads mediation.
### Install
```
dependencies:
google_mobile_ads: ^9.2.0
trek_gma_mediation: ^0.1.0
```
Requires Flutter 3.44+, iOS 15+ and Android minSdk 24+.
- Android:add maven { url = uri("https://deps.aotter.net/artifactory/libs-release-local") } and make MainActivity extend FlutterFragmentActivity.
- iOS:SPM by default; with CocoaPods add source 'https://github.com/aotter/AotterTrekSpecs-iOS.git'.
### Console setup
- Create one Trek app each for iOS and Android (each gets its own clientId).
- In your AdMob or Ad Manager mediation group, add a custom event with {"clientId":"…","adPlace":""}.
### Native ads
```
await MobileAds.instance.initialize(); // the adapter initialises Trek with your clientId
final ad = NativeAd(
adUnitId: '',
factoryId: trekNativeAdFactoryId,
customOptions: TrekNativeAdOptions.forNativeAdUnit(style: NativeTemplateStyle(templateType: TemplateType.medium)),
request: AdRequest(extras: TrekMediationExtras.of(category: 'news', contentUrl: url, contentTitle: title)),
listener: NativeAdListener(onAdLoaded: (_) => setState(() {})),
)..load();
TrekMediationNativeAdWidget(ad: ad) // at least 230 wide
```
Create a fresh TrekNativeAdOptions for every ad; use forNativeMultimediaAdUnit() for video native.
### Banners
Use the standard BannerAd / AdWidget. Trek banners come in fixed sizes only: 320×50, 320×100, 300×250.
Known limitsTrek's viewable impression fires at a different time from GMA's onAdImpression; iOS parallax creatives don't follow scrolling yet; Ad Manager is untested on devices.
## Mediation
URL: https://trek-staging.aotter.workers.dev/en/docs/mediation
AdMob · Google Ad Manager · AppLovin MAX
Already on AdMob, Ad Manager or AppLovin MAX? Add Trek as a mediation source — no changes to your existing ad code.
### AdMob / Ad Manager (custom events)
| Platform | Install | Class name | Parameter |
| iOS | pod 'AotterTrekMediation/AdMob' / /GAM · SPM AotterTrekAdMobMediation | AotterTrekGADMediaAdapter | {"clientId":"…","adPlace":""} |
| Android | com.aotter.android:trek-admob-mediation / trek-gam-mediation | see Android docs | same |
| Flutter | trek_gma_mediation | as iOS / Android | same |
iOS extras use AotterTrekGADMediationExtras (category, contentUrl, contentTitle). No fill maps to GADErrorNoFill; a clientId mismatch or missing place maps to GADErrorInvalidRequest.
### AppLovin MAX
| Setting | Value |
| Adapter class | AotterTrekMAXMediationAdapter |
| App ID | Trek clientId |
| Placement ID | Trek placeUid |
| Formats | Native · Banner · MREC |
SupportThe MAX adapter is provided as-is and needs AotterTrekSDK 5.0.1+ on iOS.
### Managing in the dashboard
Connect GAM, AdMob and AdSense under "Sources" and each keeps its own accounts, currency, timezone and settlement, so Trek revenue earned through mediation isn't double-counted. Google connections are simulated for now (issue 09).
## Third parties, verification & identity
URL: https://trek-staging.aotter.workers.dev/en/docs/partners
Trek is the default demand source, with room in the dashboard and SDK for other partners.
### Architecture
```
Publisher account
└─ Sources (each with its own OAuth / API key, encrypted server-side)
├─ Trek SSP (default)
├─ Google Ad Manager / AdMob / AdSense
├─ AppLovin MAX
└─ Third-party networks (provider adapters)
└─ Reporting: native IDs, currency, timezone, estimated / final, settlement owner, de-duplicated
└─ AI access: one grant per tool, revocable, scoped to the sources you allow
```
### Other networks & header bidding
- Prebid.js:bidder aseal, param placeUid, global clientId.
- OpenRTB 2.6:planned on the Trek ad server, including ads.txt, app-ads.txt and sellers.json.
- Adding a network:each network implements a provider adapter (accounts, reports, permissions) on the shared connector core and MCP gateway (issue 09).
### Third-party verification
| Item | Status |
| IAB Open Measurement (OMID) | OMSDK_Aotternet ships in the iOS SDK; Android and Web to be confirmed |
| IAS · DoubleVerify | Not yet integrated; Trek.use(verification) is reserved (issue 07) |
| ads.txt · sellers.json | The dashboard generates your ads.txt line; Trek publishes sellers.json |
### Identity & first-party data
- UID2 and ID5: Trek's RMN service activates identity from hashed email / phone and first-party IDs without exposing personal data.
- SDK: setUser on Web and setCurrentUser on iOS, hashed values only.
### Agent-to-agent trading
The industry is developing an MCP-based advertising protocol (AdCP). Trek's architecture leaves room for buyer agents to discover and buy inventory — a future item.
## ads.txt / app-ads.txt
URL: https://trek-staging.aotter.workers.dev/en/docs/ads-txt
Tell buyers who is authorised to sell your inventory.
### Websites
Add the line from "Placements & keys" to https:///ads.txt:
```
aseal.in, TKXXXXXXXXXXXX, DIRECT
```
### App
Put the same line in /app-ads.txt on your developer website and list that site in the App Store or Google Play.
### Check
Use the quick check (https://trek-staging.aotter.workers.dev/en#verify) or GET /api/public/verify?url=…. Ongoing crawler status will appear once the Trek diagnostics API is live (issue 04).
## Security model
URL: https://trek-staging.aotter.workers.dev/en/docs/security
Your AI can request keys but never touches a secret.
| Data | Where it lives | Visible to AI? |
| clientId, placeUid, ads.txt line | Your project, env vars, app | Yes — they're public |
| Aotter password | Aotter Account only | No |
| Trek credentials | Dashboard servers, encrypted | No |
| MCP access token | Your AI tool (standard OAuth) | Managed by the tool, revocable |
| Payee details | AotterTrek only; the dashboard keeps no copy | Only the values AotterTrek has masked; images never pass through AI tools |
| Google and other source credentials | Dashboard servers, encrypted | No |
### Rules for your AI
- Only write public identifiers to files, with the framework's public prefix.
- Never put tokens, secrets or passwords in files, commits or chat.
- Only change ad-related code.
- If a write's result is unclear, read before retrying.
### Server-side protection
- Identity and ownership are re-checked on every call; nobody can read or write another publisher's assets.
- clientId is bound to a domain or app (enforced once the live API ships, issue 03).
- Aotter sign-in, source authorisation and AI access are three separate relationships, each revocable.
- Install instructions provide knowledge, never extra permissions.
## Reporting
URL: https://trek-staging.aotter.workers.dev/en/docs/reporting
Metric definitions and data maturity.
### Metrics
| Metric | Definition |
| Requests | Ad requests the SDK sends to Trek |
| Impressions | Ads actually shown |
| Fill rate | Filled requests ÷ requests |
| CTR | Clicks ÷ impressions |
| eCPM | Estimated revenue ÷ impressions × 1000 (excluding data revenue) |
| Estimated revenue | Estimated revenue as the AotterTrek revenue page shows it: the publisher's net amount, not a settled amount (currency and timezone as the report states) |
| Data revenue | Revenue from first-party data, shown separately and not included in estimated revenue or eCPM |
### Querying
```
get_revenue_report { days: 30, groupby: "placement" } # day | asset | placement | format
```
Live and sample dataWith AotterTrek connected, each query reads your linked organization's report from AotterTrek (mode: "live"): the publisher's net amount only, with no gross amount or revenue-share ratio, up to the latest day AotterTrek provides (not today). The AotterTrek report API is still being rolled out; until it is available you see a "revenue report not available yet" message, never sample figures. Without AotterTrek, reports show sample figures generated from your placements (mode: "demo"), not real revenue (issue 05).
## API status
URL: https://trek-staging.aotter.workers.dev/en/docs/status
What's live and what's still simulated.
| Capability | Status | Notes |
| Aotter sign-in | Wired | Needs a dedicated OAuth client and callback registration |
| MCP server & auth | Available | Verified locally and in test |
| Assets & placements | Available | With Trek connected, sites/apps and placements are created in Trek first, then stored in the dashboard; without Trek they stay in the dashboard only (issue 03) |
| Automatic Trek organisation | Simulated | issue 01 |
| Trek credentials | Simulated | issue 02 |
| Production keys | Partial | Assets and placements created in Trek have real clientId / placeUid; live delivery still needs Trek approval (issue 03). Test keys work in development |
| Four-stage diagnostics | Partial | Only "configured" is real (issue 04); the public static check works |
| Revenue reports | Wired (AotterTrek side rolling out) | With AotterTrek connected, the publisher's net amount is read live; without it, sample data (issue 05) |
| Payee details | Wired (AotterTrek side rolling out) | With AotterTrek connected, the organisation's payee details are read and changed live, with personal data masked by AotterTrek and nothing kept by the dashboard; without it, sample data that cannot be changed (issue 11) |
| Wallet & payout history | Wired (AotterTrek side rolling out) | With AotterTrek connected, the organisation's wallet and payout requests are read live; every amount is AotterTrek's and nothing is kept by the dashboard; without it, sample data (issue 11) |
| Requesting a payout | Wired (AotterTrek side rolling out) | On the dashboard's Billing page only, never through MCP: a quote from AotterTrek, the signed form for a Taiwan individual (generate it, upload a photo of it signed), submitting and cancelling. AotterTrek sets the rules and amounts and the dashboard keeps nothing; until AotterTrek serves these APIs you see a "payout API not available yet" message. Without AotterTrek no payout can be requested (issue 11) |
| GAM / AdMob / AdSense | Simulated | issue 09 |
| SDK changelog | Auto-synced | GitHub and Maven; Web source pending (issue 08) |
## FAQ
### What is Aotter Raft?
Aotter Raft is Aotter's mobile native ad network. It lets apps (iOS, Android, Flutter) and websites earn with native ads, native multimedia ads and banner ads, targeted with AotterTrek first-party data; revenue, placements and keys are managed in one dashboard.
### What is AotterTrek?
AotterTrek (Trek) is Aotter's first-party data and advertising platform in Taiwan, running since 2016 with its own DMP, DSP and SSP and 5.5B+ behavioural events a month. For site and app owners it offers native and banner ad SDKs for Web, iOS, Android and Flutter, plus revenue reporting and audience insights.
### I build with AI. What's the fastest way to add ads?
After you sign up, the dashboard prepares setup and instructions for your AI tool (Claude Code, Cursor, Codex and others). Paste them in and your AI registers the site, creates placements, installs the SDK, sets public keys and ads.txt, then reports the checks. Most people see a test ad in development within five minutes.
### Is it safe to let AI request and fill in keys?
Yes. You approve the AI's access yourself via OAuth; it's limited in scope and revocable at any time. Only public identifiers (clientId, placeUid) go into your project — they ship in web pages and apps anyway and are bound to your registered domain or app. Tokens, passwords and secrets stay on Trek's servers.
### Which platforms and formats are supported?
Platforms: iOS, Android, Flutter and Web (HTML, React, Next.js, Vue). App formats: native ads, native multimedia ads and banner ads (320×50, 320×100, 300×250); websites use native multimedia ads and banners, plus sticky, pop-up, parallax, countdown, poll and other creative formats.
### Can I use Trek with AdMob, Google Ad Manager or other networks?
Yes. Trek supports AdMob / Google Ad Manager and AppLovin MAX mediation, GAM third-party creatives, GTM and Prebid. The dashboard keeps each source's accounts, currency and settlement separate, so nothing is double-counted.
### How is revenue calculated, and when can I see it?
AotterTrek calculates it: ad revenue comes from the ads in your placements, and data revenue is allocated separately for providing first-party data; the two are listed apart. “Revenue” in the dashboard reads your linked Trek organization's report live, matching the AotterTrek revenue page, and your AI can query it too. Figures run up to yesterday (Taipei time) and are estimated revenue (publisher net), not a settled amount. Viewing revenue needs the organization's admin role or the read-all-revenue function.
### Is there a manual review?
You can use test keys in development right away. Before live delivery, Trek checks domain or app ownership and ads.txt — you can keep building during the review. Our technical team is also on hand to help you go live.
### Which account do I sign up with?
You sign in with an Aotter account. Your name, email and password are managed by the Aotter account; if you do not have one yet, you can create it from the sign-in page.
### Do I have to use AI? Can I set it up without coding?
AI is optional. You can register a site or app and create placements with the forms in the dashboard, then install by following the SDK docs. If you already build with an AI tool, handing it over is the fastest route: it registers, installs and checks for you.
### Which AI tools are supported, and what is MCP?
Claude Code, Cursor, Codex, ChatGPT and other AI tools that can connect to an MCP server. MCP (Model Context Protocol) is an open standard that lets an AI assistant call outside services within the access you grant; AotterTrek uses it so your AI can register sites, create placements, fetch the install guide and read revenue. See the MCP server docs for setup.
### How do I revoke an AI tool's access?
Under “AI & MCP” in the dashboard, the “Authorised AI tools” list lets you revoke each AI tool one by one. A revoked tool disconnects right away and must be authorised again next time. Signing out does not revoke AI tools.
### What are clientId and placeUid? Can they go into my code?
clientId identifies your site or app, and placeUid identifies one ad placement in it. Both are public identifiers that appear in your pages or app anyway, so they are safe to put in code and version control. Never put a token, password or secret in your project; AotterTrek's install flow never asks you to.
### What is ads.txt, and how do I set it up?
ads.txt is a text file at the root of your site that publicly declares who is authorised to sell your ad placements. Websites: add the line shown under “Placements & keys” in the dashboard to https://your-domain/ads.txt. Apps: put the same line in /app-ads.txt on your developer website, and enter that website in the App Store or Google Play. When your AI does the setup, it adds the line and checks it for you.
### How do I check that the ad is installed correctly?
Use “Check install” on the home page and enter the URL of a page that carries the ad. It checks the SDK, clientId, placeUid, ads.txt and whether test keys are still in use. Once signed in, you can also see each stage under “Install check” in the dashboard, or ask your AI to call verify_integration.
### What if the review is not approved?
The dashboard shows why it was not approved. Fix the cause, then press “Check again” on the asset page to resubmit. Until the review passes, your placements show test ads only, so you can keep building.
### My app is not in the store yet. Can I integrate now?
Yes. Register it as not in the store yet to get your keys and install the SDK right away. Until it is in the store it shows test ads only; once it is listed, use “Report as listed” in the dashboard, then complete ownership verification and review to open live delivery.
### Can I edit or delete a placement after creating it?
Once a placement is created, its name, format and size cannot be changed, and it cannot be archived or deleted; create a new placement when you need different settings. Placements created in Trek can be paused and resumed at any time.
### I already have sites or apps in the Trek console. Do I register them again?
No. After signing in, choose your Trek organization and the asset list shows that organization's existing sites and apps, read live from Trek; anything new you register is created in the same organization. If your account belongs to several organizations, pick the one to use under “Trek organization” first.