Installation guide

NPM SDK / Package

1.Site analytics

Use this when your frontend installs dependencies with npm, pnpm, or yarn and you want the snippet loaded from application code.

  1. Open the site in Studio.
  2. Open Settings β†’ Site Analytics and copy the Embed snippet values (src, data-site, data-key).
  3. In your project root, keep the tracker as a deferred script tag (Blogdat ships as a hosted script, not a local package publish).
  4. Add the snippet once in your root layout or index.html, immediately before </body>.
  5. Deploy the change.
  6. Open a public page and confirm a visit in Site Analytics.

Do not mount the script more than once per page load. Keep data-site and data-key tied to the Studio site you are measuring.

2.Blog

  1. Open the site in Studio and go to Settings β†’ Domain.
  2. Connect blog.yourdomain.com. Studio shows the CNAME to add at your DNS host.
  3. Verify the domain in Studio after DNS propagates.
  4. Link Blog from your app shell to https://blog.yourdomain.com.
  5. To render posts inside your own UI instead, open Settings β†’ API and use the public list and post endpoints.