# Install on HubSpot Source: https://www.luriart.com/docs/install/hubspot Plain text: https://www.luriart.com/docs/install/hubspot.txt Put the Luria tag on your HubSpot pages, and (once Luria switches it on for you) connect a read-only private app so your contacts and won deals reach Luria and credit the page version each visitor saw. Time needed: about 10 minutes. Two parts. The tag goes on every page, so Luria can run tests and see visits. Then, if you like, a read-only connection brings in your HubSpot contacts as leads and your closed-won deals as sales, matched to the visit that brought them. ## What you'll need * Your Luria tag, with your site ID already filled in. Luria gives you the tag during onboarding, or by email from [hello@luriart.com](mailto:hello@luriart.com). * A HubSpot user who can edit website settings and create private apps (a Super Admin, or a user with App Marketplace access). ## Steps ### Step 1: Put the tag on your pages On pages hosted by HubSpot: **Settings → Content → Pages**, pick your domain, then paste the tag into **Site header HTML** and **Save**. ```html ``` If your pages live somewhere else (WordPress, Webflow, your own code), put the tag in that site's `` instead. HubSpot forms embedded there work the same way. ### Step 2: Let your forms carry the visit (recommended) So a form sign-up names the visit that sent it, add a hidden field to each HubSpot form: 1. In HubSpot open **Settings → Data management → Properties**, choose **Contact properties**, and create a property named `luria_sid` (single-line text). 2. Open each form, add the `luria_sid` property as a field, and set it to **Hidden**. The Luria tag fills the field on your pages. Without it, Luria still matches a contact when the same email was used on your site earlier. ### Step 3: Connect HubSpot (optional) This part is switched on per site. Email [hello@luriart.com](mailto:hello@luriart.com) (or reply to your welcome email) and ask Luria to switch on the HubSpot connection for your site. Once it is on, your dashboard's **Connections** page shows a **HubSpot** card. 1. In HubSpot open **Settings → Integrations → Private apps** and click **Create a private app**. 2. Name it Luria. On **Scopes** tick only `crm.objects.contacts.read` and `crm.objects.deals.read`. Leave every write scope off. 3. Click **Create app**, then copy the **Access token** (it starts with `pat-`). 4. On the **Connections** page, open **HubSpot**, paste the token and click **Connect**. Luria checks the token with one read and stores it locked. It then copies the contacts created in the last 90 days, a few dozen every 10 minutes, and after that every new contact. A contact counts as a lead; a deal marked closed won counts as a sale, with its amount. When leads or sales are your goal and the contact came through a visit Luria saw, it is credited to the page version that visitor saw. Luria never copies names, emails, phone numbers or companies. An email is kept only as a code that cannot be turned back into the address. A read-only token cannot change anything in HubSpot. To stop, click **Disconnect** on the card (the token is deleted), and delete the private app in HubSpot too. ## Verify it worked 1. Open your site in a private window with ad blockers off. If you are in the EU, UK or Switzerland, accept the small consent banner. 2. View the page source: the tag is in `` with your site ID in it. 3. Submit one of your forms. With the connection on, the HubSpot card on **Connections** shows one more contact copied within 10 minutes. Full checklist: [Verify your install](/install/verify). ## Common failures * **The connection says the token was refused.** The private app was deleted or its token rotated. Copy the current token and connect again. * **The connection says it cannot read contacts or deals.** A scope is missing. Edit the private app, tick both read scopes, and connect again. * **Leads arrive but are not matched to visits.** The `luria_sid` hidden field is missing from the form, or the form is on a page without the tag. * **Nothing tracked at all.** The tag is missing its site ID, or the page has not been republished. ## Next steps - [Verify your install](/install/verify) - [Webhooks](/install/webhooks) - [JavaScript events](/reference/javascript-events)