Setup guide · 2026-10-14.1 · SDK 0.6.4

Configure with your assistant

A project-specific plan for your existing extension, with secure store connections and evidence that the integration works.

Machine-readable instructions

Start from your project

  1. Open the project’s Setup page. Select the extension framework, existing surfaces, identity model and monetization cases. Keep current activation semantics.
  2. Click “Configure with my assistant” and paste the instructions into an assistant that can inspect your local repository. The public SDK key is included; owner and store secrets are not.
  3. Connect the assistant to https://extension.report/mcp. Configuration requires the separate setup:write scope and exactly one project you own. Existing analytics:read grants remain read-only. No future-project access is granted for setup.
  4. The assistant calls get_setup_plan, inspects existing code, prepares changes and uses configure_sdk/configure_store to save supported fields. OAuth and credential entry are completed by the owner in secure screens.
  5. Run local tests, doctor and the built extension. Finish with verify_setup and provide its test-start timestamp. Saved choices, old events and a successful build are separate from a verified installed extension.

Integrate the existing SDK architecture

Use the published SDK 0.6.4. Install @extension-report/js@0.6.4 with the repository's existing package manager; keep exact versions and the lockfile.

Inspect the existing repository before changing it: framework, MV2/MV3 background, package manager, manifests, supported browsers, singleton telemetry wrapper, runtime messaging, auth, license/trial state, purchase confirmation and consent setting. Do not replace an existing SDK instance or duplicate listeners.

Determine whether this is WXT, Plasmo, a plain WebExtension or a native Safari container. Do not choose a framework from the project name. Save the detected profile before implementation.

Initialize a single background/service-worker instance with projectPublicKey="pk_er_YOUR_PROJECT_PUBLIC_KEY" and instrumentation adoption:true, engagement:true, reliability:"errors". Preserve existing ceilings/settings when integrating an already-instrumented extension. No owner secret belongs in a browser package.

Merge storage, alarms and the exact Extension Report API origin into the built manifest. Preserve other permissions and CSP. Add optional feature permissions only when the extension actually uses those APIs. For Firefox, inspect required/optional data_collection_permissions and honor the technical-data grant on supported versions; do not bypass or silently reset it. For WXT, use its module or manual background integration consistently; never enable both autoBackground and a duplicate manual SDK.

Connect actual popup/options/side-panel sessions with connectExtensionReportUiSession({surface}); content scripts send narrowly validated messages to the background. Validate message type, payload and sender. Never initialize a second SDK in each UI or content script.

Selected surfaces: inspect existing surfaces. Detect absent surfaces; do not create product UI merely for telemetry.

Keep anonymous installations anonymous. If trials exist without accounts, call sdk.identify(null, safeEntitlementTraits); do not generate a fake user or use installation ID as an account identity.

Reuse existing custom event names for equivalent transitions; the trial/subscription/purchase names above are examples when no equivalent event exists. Inspect the event catalog and preserve continuity. Product-specific signals use sdk.trackCustomEvent(name, safeAttributes). The SDK has no trackPurchase or trackTrial method. TrackOptions supports flush only; implement transition/transaction deduplication in the application's existing persisted state, not a made-up SDK dedupe option. Keep backend revenue separate from client-observed checkout and entitlement events.

Identify the product's existing meaningful-value event with the owner; do not equate activation with installation or opening the popup.

Keep a visible tracking preference and honor existing opt-out/consent. sdk.setTrackingEnabled(false) must stop collection; restoring consent must not backfill suppressed actions. Never collect emails, payment tokens, receipt bodies, document text, full visited URLs or browsing history.

Validate with @extension-report/doctor@0.6.4 against each generated store manifest. Test clean install versus update, service-worker restart, popup/options sessions, offline replay, opt-out, logout/account switch, anonymous trial start/expiry/conversion, canceled subscriptions and duplicate purchase callbacks where applicable. First run against a local/test project or debug.dryRun; do not fabricate financial events in the owner's live project.

Report source edits, built artifact, installed extension and server-observed events as separate verification steps. Existing events are a baseline, not proof that the new build works. Do not commit, publish, deploy or upload a store package without authorization for that action.

Identity and monetization

Use existing stable account IDs. Identify after verified login/session restoration and clear identity at logout; test account changes. Keep workspace and person distinct. Anonymous trials stay anonymous. Traits describe verified current state; product events describe real transitions. Collect no payment secrets or customer content.

Free trials

Read authoritative entitlement state on startup and on changes. Support anonymous trials without inventing an account. Identify with entitlement_type, entitlement_status, plan_code and trial_expires_at. Emit trial_started, trial_expired and trial_converted only on verified transitions; persist transition deduplication in existing local storage. Never emit on every poll or backfill old starts on an upgrade.

Subscriptions

Use server-verified plan and subscription state. Distinguish checkout_opened from subscription_activated, canceled, renewed and expired. Cancellation scheduled for period end is not loss of access now. Identify the entitlement snapshot on changes. Payment webhooks are the authority; client observations are not audited revenue.

One-time purchases

Track purchase_confirmed only after backend or store receipt validation. Use the existing transaction identity for persistent deduplication; do not send receipts, license keys or payment identifiers. Treat refunds separately. If you send amounts, use integer minor units and an explicit ISO currency; do not sum currencies or promise revenue reports unsupported by Extension Report.

Credits and usage billing

Track verified credit/entitlement changes separately from product usage. Use sdk.count for frequent feature actions; counters are not billable usage or an accounting ledger. Avoid raw prompts, documents, browsing history or customer content. Charging remains in the existing backend.

Use sdk.identify and sdk.trackCustomEvent. There is no trackPurchase or trackTrial API, and TrackOptions does not offer a dedupe key. Keep deduplication in existing application state. Client telemetry is not an accounting ledger or validated payment webhook. The current SDK does not provide an automatic revenue pipeline.

Chrome Web Store

OAuth read connection

Fields: Chrome extension ID · Publisher ID · Google connection · GA4 source

  1. Save the existing Chrome extension ID; verify that its public listing is the intended product.
  2. Use Settings → Connect Chrome Web Store, complete Google consent in the secure browser, then select the existing connection and Publisher ID. Do not create a Google Cloud project for each customer.
  3. Use Acquisition → Connect Google Analytics. Select the Google account that can access the Chrome listing's GA4 source. Additional metrics must be enabled in the Chrome Web Store dashboard.
  4. Discover available sources, select the exact matching listing, and verify the binding before synchronization. A successful connection does not guarantee data; thresholded and missing counts stay unknown.
  5. Check Releases for published/submitted versions and Acquisition for the last successful sync, source timezone and reporting coverage.

Firefox Add-ons

Public listing · no API key

Fields: AMO listing URL, slug or add-on ID

  1. Find the public AMO listing for the exact extension. Do not infer identity from its name alone.
  2. Save its URL or add-on ID. No publishing key is required for public version, average daily users, weekly downloads or ratings.
  3. Verify the returned add-on identity, public version and successful check time. Public counters are observations, not reconstructed daily private statistics.
  4. Keep Mozilla publishing credentials in the user's own release environment. Private developer statistics require a separate supported source; they are not unlocked by this public connector.

Microsoft Edge Add-ons

Public listing + private CSV reports

Fields: Edge listing URL or CRX ID · Partner Center Product ID · Submission reporting token

  1. Save the public Edge CRX ID; it differs from the Partner Center Product ID and the Chrome extension ID.
  2. Verify the public version, users and check time. This public listing does not expose certification status.
  3. For release-command tracking, copy the Partner Center Product ID and configure a random project-scoped reporting token using Settings and the user's secret manager. Extension Report stores its hash, never Microsoft publication credentials.
  4. Keep Edge publishing keys in the local release environment. Point the publication command to the displayed project endpoint. Verify a real command receipt when a future authorized submission occurs; do not publish a package just to test configuration.
  5. For private analytics, export Weekly users, Installs and Impressions from Partner Center. Allow that site's downloads if Chrome blocks them. Import each with the matching measure. Standard item exports include applicationId; distribution exports with dynamic columns must be normalized with their known listing, measure and dimension before import.
  6. Verify period, enabled state, country, language and OS. Weekly populations cannot be added across weeks; missing report days are not zero. Analytics are CSV imports, not an undocumented publishing-API feature.

Safari · direct distribution

SDK + updater feed · guide only

Fields: Signed updater feed URL · Containing app and extension identity

  1. Inspect the containing macOS application and Safari extension separately. Installation, app launch and actual extension use are distinct events.
  2. Identify the existing signed updater feed and release process. Never replace signing identities or notarization credentials during telemetry setup.
  3. Integrate the JS SDK only where the existing Safari Web Extension architecture supports it. Route native app events through an existing validated bridge; do not invent a native SDK.
  4. Verify extension enablement, a real extension UI session and update checks with the installed app. Direct distribution has no App Store analytics source.
  5. Automatic feed configuration is not implemented in Extension Report yet; keep the manual guide explicit.

Safari · App Store

Internal pilot · customer connector pending

Fields: App Store app ID · Bundle ID · Issuer ID and reader key in secure storage

  1. Identify the containing Mac App Store app and its Safari extension. Confirm the current public storefront version; READY_FOR_SALE history alone is not proof of the latest live version.
  2. Review the Apple API agreement applicable to the customer's team. Our internal AMOREM pilot does not authorize a commercial third-party key connector.
  3. For authorized internal use, the team owner enables App Store Connect API access and stores a Sales and Reports key securely. Never paste a .p8 key into an assistant prompt. Publication credentials remain separate.
  4. An authorized administrator initializes an ONGOING Analytics report request for the exact app. Reader access alone cannot perform this initialization.
  5. Wait for generated instances. A catalog definition or successful request is not a downloadable report. Preserve report/instance/segment identity, processing dates, corrections and privacy thresholds.
  6. Treat Safari Extensions Usage/Enablement separately from containing-app downloads/sessions. This customer connector is not currently available in Extension Report; the assistant must report that boundary rather than claim it connected.

What the assistant can change

setup:write can save the SDK integration profile, activation event and supported store bindings for one explicitly selected owned project. It cannot publish a store package, rotate SDK keys, delete data, edit billing or publish remote collection controls. Revoke the client from AI connections or disable project MCP access to stop further calls. Mutation audits record tool, project, outcome and time without storing prompts, arguments or credentials.