Resources
Migrating from folio-sdk
The product was called Folio. What changed, and what keeps working while you move.
Existing installs keep working, so you can move at your own pace.
What keeps working#
/folio.jsandwindow.folio(the same object aswindow.tug). Returning visitors keep their anonymous ID./folio-embed.js,/folio.cssandwindow.Folio.mountBanner, with the oldfolio-*class names, so your custom CSS still applies.- Server API keys that start with
folio_. - The
X-Folio-Webhook-Secretheader on the PostHog webhook. - Every old SDK export, as a deprecated alias of its Tug name.
Move to the new names#
Swap folio-sdk for tug-sdk, then rename as you go:
Shell
npm uninstall folio-sdk
npm install tug-sdk| Before | After |
|---|---|
FolioClient | TugClient |
FolioProvider | TugProvider |
FolioBanner | TugBanner |
FolioCard | TugCard |
FolioModal | TugModal |
useFolioDecision | useTugDecision |
/folio.js, window.folio, folioConfig | /tug.js, window.tug, tugConfig |
folio-* classes, --folio-* variables | tug-* classes, --tug-* variables |