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.js and window.folio (the same object as window.tug). Returning visitors keep their anonymous ID.
  • /folio-embed.js, /folio.css and window.Folio.mountBanner, with the old folio-* class names, so your custom CSS still applies.
  • Server API keys that start with folio_.
  • The X-Folio-Webhook-Secret header 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
BeforeAfter
FolioClientTugClient
FolioProviderTugProvider
FolioBannerTugBanner
FolioCardTugCard
FolioModalTugModal
useFolioDecisionuseTugDecision
/folio.js, window.folio, folioConfig/tug.js, window.tug, tugConfig
folio-* classes, --folio-* variablestug-* classes, --tug-* variables

  • PageOverviewGet started
  • PageQuick startGet started
  • PageConceptsGet started
  • PageScript tag (tug.js)Install
  • PageReactInstall
  • PageNode and serverInstall
  • PageIdentity verificationGuides
  • PageCounting and holdoutsGuides
  • PagePostHogGuides
  • PageEnvironmentsGuides
  • PageData requestsGuides
  • PageOperator consoleGuides