Skip to main content
Navattic JS is a script that you add to your website and app to connect demo activity to the visitors who later convert. Navattic JS is used to:
  1. Attribute demo activity to pipeline by identifying visitors who submit a form or log in after viewing a demo.
  2. Match demo visitors to existing HubSpot or Marketo contacts.
  3. Send demo events to analytics tools already installed on your website, such as GA4, Segment and Amplitude.

How Navattic JS ties demos to pipeline

For example, a visitor views a demo on one page, then submits a demo request form on another page. Navattic JS identifies the visitor from the form submission and links their earlier demo activity to that email. Without Navattic JS, Navattic can’t connect the form submission to those earlier demo sessions. The visitor and their demo engagement then appear in the Visitors tab. You can sync them to your CRM with Playbooks.

Set up Navattic JS

Follow these steps to install Navattic JS on your website and app.
1

Copy your install snippet

In Navattic, go to Settings > Navattic JS and copy the snippet under Installation.One snippet works on every site: your marketing site, app, docs and blog.
Copy your install snippet step with the Navattic JS snippet and copy button
2

Paste it into your site-wide <head>

Add the snippet once to the <head> of your site-wide template or tag manager. The snippet then loads on every page automatically, so you don’t need to add it to individual pages.
  • If you use Google Tag Manager, follow the Google Tag Manager setup.
  • If a developer manages your website, click Send to a developer to email them the snippet and a link to this page.
Paste the snippet step with Google Tag Manager and Send to a developer options
3

Load your site to verify

Open any page that has the snippet. Navattic detects the snippet automatically, usually within a minute. The Installation status then changes from Not connected to Connected.Click Check now to refresh the status, or Per-site status to see which of your sites have Navattic JS.
Load your site to verify step with Per-site status and Check now buttons
To identify the most visitors, add Navattic JS to your app (for example, app.company.com) as well as your website. Then identify logged-in users.
If the status stays Not connected, open Per-site status and confirm that your site URLs are listed. Navattic only checks for the snippet on the sites listed there.

Choose what Navattic JS tracks

Under Configuration on the same settings page, turn on the settings that match your website. For pipeline attribution, turn on Auto form tracking and Cross-domain tracking.
Auto form tracking can’t capture forms inside an iframe, such as many Pardot forms. To capture those forms, see Capture forms inside iframes.

Add tracking with code

These options require changes to your website or app code.

Identify visitors with Navattic JS

Call navattic.identify() whenever the visitor’s email is available, such as after they log in. This identification method is prioritized over the automatic tracking settings above.

Send events to your tracking scripts

Use navattic.onEvent() to forward every Navattic event, such as a step view or a completed flow, to analytics tools on your site. Add the code below your Navattic JS snippet.
See Subscribe to events for examples for GA4, Amplitude, Mixpanel, Segment and other tools, and for the full list of events.

Capture forms inside iframes

Due to browser security restrictions, Navattic JS can’t capture form submissions inside an iframe, such as a Pardot form. To capture them, add the script below to the page that hosts the form. The script sends the submitted fields to the parent page, where Navattic JS identifies the visitor. Update these values before adding the script:
  • PARENT_ORIGIN: the origin of the page that embeds the form, such as https://www.company.com.
  • FIELDS_TO_SEND: your form’s field names, each mapped to the name Navattic should use. Map the email field to email.
  • iframe-form: the ID of your form element.
If your site uses a cookie consent banner, Navattic JS respects your visitors’ consent choices. You can configure embedded demos to suppress tracking until a visitor accepts cookies, and integrate with consent platforms such as OneTrust and Cookiebot. See Cookie consent for integration details, including how to send consent signals to embedded demos using postMessage.