{"id":97358,"plugin_id":"plugin_asdk_app_6af088ec57ac81919a158b6b5668b2b6","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-15T12:08:46.717Z","digest":"9ca697916569fe8601f126c35a23faf52b3e96df018a7a5049dfed844dd18353","against":null,"payload":{"description":"Wire the BillDog SDK into an app, or diagnose one that is already wired. Use when the user asks to add BillDog, set up paywalls or subscriptions with BillDog, add BillDog analytics/surveys/messaging, fix a BillDog integration that shows nothing, or asks why a BillDog paywall is not appearing.","included_files":[],"name":"billdog-integration","skill_md_contents":"---\nname: billdog-integration\ndescription: Wire the BillDog SDK into an app, or diagnose one that is already wired. Use when the user asks to add BillDog, set up paywalls or subscriptions with BillDog, add BillDog analytics/surveys/messaging, fix a BillDog integration that shows nothing, or asks why a BillDog paywall is not appearing.\n---\n\n# Integrating BillDog\n\nBillDog is paywalls, analytics, messaging, surveys, journeys and auth behind one\nSDK and one dashboard.\n\nThe exhaustive per-platform reference — every install line, every docs URL — is\nserved at **https://billdog.io/SKILL.md**. Fetch it when you need a platform this\nfile does not cover. What follows is the procedure and the things that are easy\nto get wrong.\n\n## Diagnose before you change anything\n\nA project is already wired if any of these exist: `.billdog.json`,\n`@billdog.io/*` in `package.json`, `io.billdog:billdog-*` in a Gradle file, or\n`billdog-ios-spm` in `Package.resolved`.\n\nIf it is wired, the problem is usually a missing placement or a missing identify\ncall — not a missing install. Diagnose first: call the MCP tool\n`get_setup_status`, which returns exactly what is missing with dashboard links.\n\nThere is no published BillDog CLI on npm; `npx billdog` will fail. Without the\nMCP server, verify by hand using the checklist at the end.\n\n## Identifiers\n\nGetting these wrong is the single most common failure, because neither fails\nuntil install or compile time:\n\n| | Correct | Does not exist |\n|---|---|---|\n| npm scope | `@billdog.io/…` | `@billdog/…` |\n| Maven group | `io.billdog:…` | `com.billdog:…` |\n\n- **Web** — `npm install @billdog.io/web`\n- **React Native** — `npm install @billdog.io/react-native`\n- **Expo** — `npm install @billdog.io/expo`\n- **iOS** — SPM `https://github.com/billdogai/billdog-ios-spm`, products\n  `BillDogFull` (everything) or `BillDogEng` (engagement only). Different\n  modules, different public surfaces — pick one and import only that.\n- **Android** — `io.billdog:billdog-core`, `io.billdog:billdog-analytics`,\n  `io.billdog:billdog-auth`, and siblings. Entry point `io.billdog.core.BillDog`,\n  a Kotlin `object`.\n\n## Configure\n\nThe web SDK is a **default-exported singleton**. There is no `new BillDog(...)`\nand no `init()`:\n\n```ts\nimport BillDog from '@billdog.io/web';\n\nBillDog.configure({\n  apiKey: process.env.BILLDOG_API_KEY,\n  environment: 'production',\n});\n\n// When your user signs in:\nawait BillDog.logIn('user_123');\n```\n\n## Placements\n\nA placement is the named spot where a paywall can appear. Code references the\n**placement identifier**, never a paywall id — that is what lets the paywall\nchange without a release. Create one under Paywalls → Placements.\n\nA project with a valid key and an installed SDK but no placement is wired\ncorrectly and still shows nothing. That is the most common \"it doesn't work\".\n\n## Critical rules\n\n- **Public keys in client code. Never a secret key.** If the user offers a\n  secret key for a mobile or web app, say so and ask for the public one.\n- **Never commit a key.** If there is no ignored env file, create one and add it\n  to `.gitignore` in the same change.\n- **Configure once, early** — before any other SDK call.\n- **Identify before fetching a paywall**, or the user is anonymous and targeting\n  will not match.\n- **Do not invent identifiers.** If a package, class or method is not in this\n  file or at https://billdog.io/SKILL.md, look it up. A plausible guess here\n  costs a failed build in someone else's repo.\n\n## Verify before reporting success\n\n1. The SDK package is in the dependency manifest.\n2. `configure` runs before any other BillDog call.\n3. A customer id is set before any paywall fetch.\n4. A placement identifier in code matches one in the dashboard.\n5. Events appear under Analytics → Live within a minute.\n\n## Reading and setting up the project over MCP\n\nThis plugin ships the BillDog MCP server (`https://api.billdog.io/mcp`). The\nfirst call opens \"Sign in with BillDog\" in the browser; the user picks one\nproject and whether you may only read, or also create and publish.\n\n- **Inspect instead of asking:** `get_setup_status`, `list_products`,\n  `list_entitlements`, `list_offerings`, `list_paywalls`, `list_placements`,\n  `resolve_placement_preview`, `get_recent_sdk_activity`.\n- **Set up the catalog:** prefer one `apply_setup_plan` call over many single\n  writes. New products, offerings and placements start inactive.\n- **Paywalls:** `list_templates` → `create_paywall_from_template` or\n  `design_paywall` → `update_paywall` → `preview_paywall` → `publish_paywall`.\n  Publishing and anything that changes what live users see needs the publish\n  permission; ask the user before you do it.\n\nCustomer contact details are never returned.\n\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}