Overview
TinySDK is a lightweight JavaScript library that bridges the gap between no-code Webflow sites and the Celtic API ecosystem. It enables faster iteration across multiple brand storefronts (Spruce Collective, Athera Sports, PetKind, Yoor) without deploying code changes to each site individually. Instead of rebuilding checkout flows, raffle widgets, and tracking pixels for every new brand, marketing teams can drop a single script tag into any Webflow page and instantly activate:- API-powered checkout widgets with live raffle availability
- Countdown timers that sync with draw deadlines
- Free-entry forms with phone number capture for compliance
- Analytics hooks for Triple Whale, PostHog, Microsoft Clarity, and GA4
- A/B testing via URL parameters—no deployments needed
- Modal management with accessibility and focus trapping
- Order tracking and checkout status embeds
- v1.0.0
- ≤ 1.8KB gzipped
- Zero dependencies
- Works on Webflow & static HTML
Getting Started
You can get up and running without writing any complex code. Just copy the snippets below and you are ready to go.1
Configure your brand
Add this JSON block to your page to tell the SDK which brand (e.g., Athera, Spruce) you are serving. This ensures checkout links and redirects work correctly.
2
Load the script
Place this script tag just before your closing
</body> tag.3
Add features
Copy the HTML patterns for the features you want to use (see below) and paste them where you want them to appear on your page.
Features
🕒 Countdown Timer
Keep launches honest with a clock that updates itself. It hides automatically when the deadline passes.🛒 Checkout Widget
A polished purchase box without building a custom form. Includes built-in quantity limits and brand themes.🎟️ API Checkout Widget
Let the raffle data populate itself straight from Spruce. Ideal for Webflow pages that need live availability.🪟 Modal Manager
Pop-ups with good manners and no extra libraries. Focus trapping keeps accessibility on point.🧪 A/B Testing
Swap imagery by sharing a special link—no deployment required.Configuration Options
The SDK reads configuration from a JSON script tag with idtiny-sdk-config.
Debugging
Something not behaving? Open your browser developer tools and look for console messages labelled “TinySDK”—they translate technical issues into plain language.| Symptom | Likely cause | What to try |
|---|---|---|
| Script loads but nothing reacts | Config block missing | Confirm the JSON snippet with id tiny-sdk-config is on the page. |
| Countdown stays hidden | Date format invalid | Use a full timestamp like 2024-12-31T23:59:59. |
| Checkout widget looks empty | Missing data-item-id | Make sure the container includes data-item-id and pricing attributes. |
SPA Integration
For single-page applications, callTinySDK.refresh() after route changes:
Technical Details
⚡ Performance
- Core SDK: ≤ 1.8KB gzipped
- Each module: ≤ 1.2KB gzipped
- Zero dependencies
- Non-blocking initialization
- Idempotent operations
🔒 Security
- Redirect allowlist prevents open redirects
- URL encoding prevents injection attacks
- CSP compatible
- Webflow.io debug logging