Trek SDK overview

Where each platform stands today, and the next-generation SDK designed for the AI era.

Get my keys

Platforms

PlatformInstallIDsDocs
Webstatic.aottercdn.com/trek/sdk/3.5.8/sdk.jsclientId · placeUidWeb
iOS 15+SPM AotterTrekSDK-iOS 5.x · CocoaPodsclientId · placeIDiOS
AndroidGradle com.aotter.android:trek-adsclientId · placeUidAndroid
Flutterpub trek_gma_mediation (via Google Mobile Ads mediation)AdMob ad unit + custom eventFlutter

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
// <trek-ad place="article_inline"></trek-ad>                   // 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.
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 }