> ## Documentation Index
> Fetch the complete documentation index at: https://docs.marro.si/llms.txt
> Use this file to discover all available pages before exploring further.

# Website tracking

> See which pages your leads visit on your website and start automations from it.

Website tracking records the pages people visit on your own website. Once a visitor becomes a lead, through one of your forms, the website chat or a link you sent them, their visits show on the lead, before and after they got in touch.

> [!NOTE]
>
> Website tracking is part of the Leads module. You need permission to manage your organization's settings to set it up.

## Set it up

**1. Open Website tracking**

Open **Settings → Integrations → Website tracking**.

**2. Add your websites**

Under **Your websites**, write each website, one per line, like `example.com`. Subdomains are included. Pages on any other website are ignored.

**3. Turn it on and save**

Turn on **Record visits** and press **Set up website tracking**. The code to paste appears.

**4. Add the code to your website**

Under **Add it to your website**, press **Copy code**. Paste it just before `</body>` on every page, or in your site builder's custom code.

**5. Update your privacy policy**

Under **Your privacy policy**, press **Copy text** and add it to your website's privacy policy, in your own words if you prefer.

The code never changes, so you can change any setting later without touching your website. The page shows how many visits were recorded in the last 30 days, so you can see it working.

## How visitors become leads

Visits are anonymous until the visitor is known. Then their earlier visits, and every visit after, belong to the lead:

* **Forms**: a Marro form embedded on a tracked page links the visitor when they send it.
* **Website chat**: a [website chat](https://docs.marro.si/guides/website-chat.md) on a tracked page links the visitor when they write with their phone number.
* **Links you send**: with **Recognise leads from your links** on, links to your tracked websites in emails and WhatsApp messages sent from Marro say which lead opened them.

A visitor recognised later as a different lead keeps their earlier visits with the first lead.

## On the lead

* **Website** in the lead's **About** facts: when the lead was last on your website, like "2 hr ago", and the page they came back to most, like "Pricing 5×". It shows when the last visit was in the last 30 days.
* **Website visits**, its own section in the record panel on the left, open by itself after a visit in the last 7 days: the pages viewed more than once, then each recent visit with when it was, where it came from ("Google search", "Instagram · Reels campaign", "Facebook ad", "Direct visit"), the device, the time on your website, and the pages in the order they were seen with their times. A page seen again in the same visit says **again**.
* **The timeline** has one **Website visit** entry per visit, not one per page, at the time the visit happened, with the same details. Visits from before the lead was known get their own entries at their own times, so the timeline reads in order: the visits, then the form or chat that made them known.

Pages are shown by their names, without your website's name ("Pricing", not "Pricing | Your brand"); a page without a title is named from its address. The mobile app shows the same on the lead's screen and timeline.

## Automations

Choose the trigger **A lead visits a page on your website** in an [automation](https://docs.marro.si/guides/automations.md):

* **Address contains** a text, like `pricing`, or **Address is** a page, like `/pricing`. Empty means any page.
* **Once per page per visit**: on by default, so opening the same page again in one visit starts nothing.

Only leads already known start it. For example: when a lead visits the pricing page, create a follow-up for their owner. A follow-up for the lead's owner needs the lead to have one: a lead with no owner gets none, and the automation's run says so.

## Reports

In [custom reports](https://docs.marro.si/guides/custom-reports.md), choose the source **Website visits** to count visits by date, where they came from, campaign, landing page, device and whether the visitor is a known lead, and to see pages viewed and time on the website. People who see only some leads see only those leads' visits.

## Privacy

* **Ask before recording**: visitors from the EU, the UK and Switzerland are always asked first and nothing is recorded until they agree. Choose **Everyone** to ask every visitor.
* **Show the cookie notice**: Marro shows a small notice with **Accept** and **Decline**. If your website has its own consent tool, turn this off and have the tool call `marro("consent", true)` when the visitor agrees.
* Browsers set to **Do Not Track** or **Global Privacy Control** are never recorded, nor are search engines and other bots.
* Network addresses are shortened before they are stored, and personal details in page addresses (an email, a token) are removed.
* **Keep visits for**: 13 months unless you choose otherwise (1 to 24 months). Older visits are removed every day. Deleting a lead removes its visits for good. If Marro deleted a lead for you and you ask it to put the lead back, the visits do not come back.

## Ask the assistant

The assistant, on the web and on WhatsApp, can tell you what a lead viewed ("What did Priya look at on our website?") and change these settings with your approval.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.