Quick start
Add Loomduct to your site and see your first visitors in a few minutes.
Add Loomduct analytics to this project. Follow the steps in https://loomduct.com/docs/install/ai-agent.md Ask me for the project token. Do not read .env files.
Or set it up yourself:
Create a project
Start a free trial and create a project for your site.
Copy your project token
In the dashboard, open the project menu at the top of the sidebar, select Project settings, then Copy project token. The token starts with lmt_. It is public, so it is fine in your site's code.
Add Loomduct to your site
Use npm for apps built with a bundler, or the script tag for any website. Replace lmt_your_project_token with your token.
import { Loomduct } from '@loomduct/js'
import { webAnalytics } from '@loomduct/js/web-analytics'
export const loomduct = new Loomduct({
token: 'lmt_your_project_token',
plugins: [webAnalytics()],
})
loomduct.load()- npm: run
npm install @loomduct/jsfirst, then importsrc/loomduct.tsonce in the file that starts your app. Using Next.js or React? See Next.js and React with Vite. - Script tag: paste it into the
<head>of every page. Using WordPress, Webflow, Framer, Shopify or Google Tag Manager? Follow the guide for your platform under Install.
See your first visitor
Open your live site in a new tab, then open your project in the dashboard. Your visit shows up as online now on the Overview within a few seconds.
Loomduct skips localhost, so test on your live site. If nothing shows up, open the browser's network tab and look for a request to /l/e: 202 means Loomduct received the event.