Install

Install AnalyticFast in a Lovable website

Ask Lovable to inspect the project before installing one tracker in its shared entry point. The plain script avoids assuming that an npm package is published or that every generated project uses the same layout.

Install on Lovable

Start by adding the website in AnalyticFast and selecting its domain, timezone and currency. These examples use https://t.analyticfast.com; the origin and Site ID shown in your site’s Settings take precedence.

  1. Create the website in AnalyticFast and copy its real Site ID. Open the corresponding Lovable project.
  2. Paste the prompt below into the project chat, replacing the Site ID. Use the site-specific AI install prompt from Settings when available.
  3. Review the resulting code in Code view or your connected repository. Confirm one installation in the shared HTML head, or one browser initialization in a root client component.
  4. Publish the website, visit its configured public domain and run Verify installation. Review again after prompts that replace the root layout or analytics setup.
Inspect this project's framework, shared HTML entry and existing analytics.
Install exactly one deferred AnalyticFast tracker with:
<script defer data-website-id="YOUR_SITE_ID" src="https://t.analyticfast.com/js/script.js"></script>
Replace YOUR_SITE_ID with my site's actual ID before publishing.
The tracker already records initial views and SPA route changes.
If there is an analytics consent banner, use data-consent="pending"
and wire its accept/decline actions to window.analyticfast's consent command,
unless my chosen policy blocks collection entirely before consent.
Keep webhook secrets and scoped server tokens out of browser code.
Do not treat a Buy click or a success-page view as a confirmed payment.
Show the changed files and explain how to verify the published domain.

Code editing permissions depend on your Lovable plan. If the project uses React and you choose the local SDK, put initialization in a client effect and follow the npm guide. Keep identity calls limited to information customers supplied. Lovable’s own analytics and an AnalyticFast installation are separate systems; one does not configure the other’s payment attribution.

Screenshot placeholder: Lovable code review showing one tracker in the shared entry point, with no payment secrets.

Verify the published website

  1. Replace YOUR_SITE_ID with the ID for this website, then open its public domain in a normal browser. A builder preview, localhost, webdriver or a visit with ?ml_ignore=true may be ignored.
  2. In browser Network tools, check https://t.analyticfast.com/js/script.js and the request to /api/event. A downloaded script or a successful HTTP response alone does not prove that an event was accepted.
  3. Use Verify installation in AnalyticFast and check the last received event. If none arrives, check the Site ID, allowed hostname, consent configuration, duplicate installations and any blocker. Domain ownership verification is a separate step.

If your site has a Content Security Policy, allow https://t.analyticfast.com in both script-src and connect-src. Do not put tokens, customer email addresses or private keys in the snippet, URLs or goal properties.

Connect your consent choice

If your site uses an analytics consent banner, use the pending-consent snippet and connect its Accept and Decline/withdraw actions. Pending mode sets no analytics cookies; it still records visits using the collector’s cookie-free identity mode. A consent manager that blocks the tag entirely prevents those requests. Choose the collection behavior appropriate for your site; pending mode is not a promise of legal compliance.

<script defer data-website-id="YOUR_SITE_ID" data-consent="pending" src="https://t.analyticfast.com/js/script.js"></script>
// In your existing banner handlers:
window.analyticfast?.('consent', true);  // Accept
window.analyticfast?.('consent', false); // Decline or withdraw

Restore a stored choice on later visits. See the consent implementation guide for the full state and identity behavior.

Official platform references

Instructions reviewed against the repository and official platform documentation on October 31, 2026. Screenshots are reserved placeholders; no live platform installation is claimed here.

Add your website to get its Site ID and installation checklist. Once visits arrive, connect your payment provider.

Questions, answered.

Can Lovable’s generated success page replace a payment webhook?

No. A success page can be visited or refreshed without a new successful payment. Connect the payment provider’s signed webhook for revenue, and forward optional attribution IDs through the documented checkout metadata.

Does installing the script also record purchase revenue?

No. It records visits and goals. Connect a supported payment webhook and pass visitor/session IDs into checkout metadata to connect verified payments with traffic. A Buy click or thank-you pageview is not payment confirmation.

Why does the script load but no visit appears?

Check the real Site ID, accepted hostname, published code, consent settings and blockers. Localhost, automation and ignored visits may be excluded. Use the last received event in AnalyticFast as evidence; the script download alone is insufficient.