← Documentation

Install VisitLift on your website

Copy the tracking code, publish your website, and confirm that your first visit arrived.

Find your website in Settings

Sign in to VisitLift, open Settings, and select the website you want to track using the website selector. If you have not added it yet, choose Add website and enter its public domain. For example, register your-business.com for a website you open at https://your-business.com. A separate app.your-business.com subdomain needs its own matching website registration.

Under Website & installation, choose Open installation guide. The guide contains your website’s actual tracking code and three setup steps. Keep it open in one tab and your website editor or code project in another.

The value named Site ID, sometimes called a tracking ID or API hash, tells VisitLift which website receives these events. It is an opaque public identifier in data-site, not a password or a Stripe API key. Copy it from your own guide; do not use another website’s ID.

1. Install the tracking code

Choose Copy script for a manual installation, or Copy AI agent prompt if an AI coding assistant edits your website. The AI prompt includes the correct script address, Site ID, and registered domain. Paste it into your website’s coding assistant, then review the changes it proposes.

For a website builder, open its site-wide custom code or global header setting and paste the script into the HTML head area. For a plain HTML or React/Vite website, add it once to the shared HTML document or template used by public pages. For Next.js, follow the Install with Next.js guide instead of adding a raw script to individual pages.

Install one tracker for this website. Do not add it separately to every React component, through both a tag manager and your layout, or on each route change. Keep private pages and paths containing names, emails, tokens, or other personal information excluded.

2. Publish and visit your website

Save your website changes and use your normal Publish or Deploy action. Editing a local file or preview alone does not update the public website. Wait for the deployment to finish.

Use Open website in the VisitLift guide, or open the registered public domain yourself. Visit a normal public page, then follow an internal link to another page. These visits generate the first pageview events. You do not need to connect Stripe or create a conversion goal first.

3. Verify your first event

Return to the installation guide and choose Check for first event. The guide also checks automatically while it is open. A received-event timestamp confirms that VisitLift accepted traffic for this website; it does not confirm Stripe revenue or a completed signup goal.

If the guide still shows that it is waiting, open your published page again, allow a few seconds for the request, and check again. After verification, open Overview or Acquisition to inspect your traffic. Dashboard reports refresh periodically; the first-event check is the quickest setup confirmation.

If no event appears

Check the domain first. The page you visit must match the website registered in Settings. A different subdomain or an unpublished preview URL will be rejected. Confirm that the public page contains the exact script and data-site value from the guide.

Check whether this browser or path is excluded. Settings lists excluded paths. If you previously used #visitlift-ignore to exclude your own browser, open the website with #visitlift-track to undo that preference. Private or excluded pages will not verify tracking.

Localhost and 127.0.0.1 are ignored by default. The simplest verification is your published, registered domain. Intentional local tests require a developer-mode website registered for localhost and the explicit data-track-localhost="true" script attribute; a localhost page cannot verify a different production domain.

Try a browser window without blocking extensions. A developer can use the Network panel to check that tracker.js loads and POST /api/collect reaches the tracker’s origin. If your website has a Content Security Policy, allow that exact origin in script-src and connect-src, preserving your existing security rules.

Basic VisitLift tracking works without calling setConsent(true). That call enables optional persistent attribution only after appropriate visitor consent. If your own consent manager blocks the entire script, review that integration rather than switching on attribution merely to pass verification.

Example prompt for a coding assistant

The Copy AI agent prompt button generates a ready-to-use prompt for the website selected in Settings. This documentation example contains placeholders; replace YOUR_SITE_ID, YOUR_REGISTERED_DOMAIN, and the tracker host before using it. The prompt helps an assistant install and check the tracker without inventing credentials or a successful verification.

Install VisitLift analytics for this existing website.

Website: "Your website"
Public domain: "YOUR_REGISTERED_DOMAIN"
VisitLift website ID: "YOUR_SITE_ID"
Tracker origin: https://your_visitlift_host

Installation code:
<script defer src="https://your_visitlift_host/tracker.js" data-site="YOUR_SITE_ID"></script>

1. Inspect the project and identify its framework and shared public layout. Install this exact tracker once in the global head, or use the framework's supported script component. For Next.js App Router, use next/script in the root layout with strategy="afterInteractive" and the exact src and data-site values above. Do not duplicate the tracker on each route.
2. Keep basic cookieless tracking as the default. Do not add personal information, email addresses, names, payment details, custom event properties, persistent identifiers, or consent bypasses. Do not call setConsent(true) unless a separate, explicit visitor-consent integration already grants permission. Do not invent Stripe keys or other configuration.
3. Check the site's existing content security policy and permit this tracker origin for script-src and connect-src if needed, preserving all other protections. Keep existing application behavior and environment configuration intact.
4. Run the project's relevant checks, then use its normal deployment process and required approvals to publish the change to YOUR_REGISTERED_DOMAIN. Do not claim a deployment or check succeeded without actual evidence.
5. Visit the published domain in a browser with the tracker allowed. Localhost is excluded by default. Open VisitLift's installation guide for this website and click "Check for first event". Verification requires a real accepted event and timestamp in VisitLift; a visible script alone does not prove collection. If no event arrives, report that it is not verified and inspect the domain, network request, CSP, exclusions, and blocking extensions.

Report the files changed, checks actually run, deployment outcome, and real event-verification result. If repository or deployment access is unavailable, explain the missing access instead of fabricating a result.

After installation

Keep the guide’s script address when moving between preview and production; use the freshly generated code if your VisitLift deployment origin changes. Avoid installing a second copy during the move.

Next, add a conversion goal or connect Stripe Checkout using the separate guides. Do not paste Stripe keys, webhook signing secrets, customer emails, or payment details into the tracking script or event names.