Skip to content
Lapis
Esc
↑↓navigate↵open⌘Jpreview
On this page

Minimal data mode

Run the Lapis pixel so it records page views and ad clicks only: no button text, no form activity and no emails.

By default the Lapis pixel records page views, time on page, scroll depth, the text of the buttons and links a visitor clicks, form submissions, and a hashed email when a visitor submits a form. That helps us see where ad traffic drops off.

If your pages hold sensitive answers, for example an onboarding quiz, you can turn all of that off and keep only what attribution needs. Lapis then sees which ad brought a visitor and which pages they viewed, and your backend reports the conversions through the Conversion API.

What is sent

Standard Minimal data mode
Page views, with the page path and title Yes Yes
Ad click IDs and utm_* / lapis_* parameters Yes Yes
Other query parameters in URLs Yes No, dropped in the browser
Time on page and scroll depth Yes Yes
Text of buttons and links clicked Yes No
Form submissions Yes No
Hashed email On form submit Never
Conversions you send with lapis() or the Conversion API Yes Yes

The pixel never sends what people type into form fields, in either mode.

Set it up

Minimal data mode needs pixel v2.2.1. It uses three switches together.

1. Load v2.2.1 with two script options

<script
  async
  src="https://cdn.trylapis.com/pixel/v2.2.1/lapis-pixel.js"
  data-key="YOUR_API_KEY"
  data-identity="off"
  data-url="strip"
></script>
  • data-identity="off": the pixel never hashes or sends an email.
  • data-url="strip": every URL the pixel sends keeps only the attribution parameters (utm_*, lapis_* and ad click IDs). Every other query parameter and the #fragment are dropped before anything leaves the browser.

The pinned v2.2.1 URL never changes. Visitors in the EU, EEA, UK and Switzerland get the same consent gate as on the standard tag. You can also host the file yourself.

2. Mark the whole page as no-track

Add data-lapis-no-track to the <html> element:

<html lang="en" data-lapis-no-track>

Nothing inside an element with this attribute is recorded: no clicks, no button or link text, no form submissions. On <html> that covers the whole page. Page views and your own lapis() calls still go through.

If you can’t edit the page template, set it from a script that runs before the pixel:

document.documentElement.setAttribute("data-lapis-no-track", "");

3. Send conversions from your backend

In minimal data mode the pixel doesn’t see sign-ups or purchases on its own. Send them from your server through the Conversion API, or call lapis("signup") and similar from your code when they happen.

Google Tag Manager

Tag Manager does not reliably keep data- attributes on a script tag written into a Custom HTML tag, so build the element in code:

<script>
(function () {
  if (window.__lapisTagLoaded) return;
  window.__lapisTagLoaded = true;
  document.documentElement.setAttribute("data-lapis-no-track", "");
  var s = document.createElement("script");
  s.src = "https://cdn.trylapis.com/pixel/v2.2.1/lapis-pixel.js";
  s.async = true;
  s.setAttribute("data-key", "YOUR_API_KEY");
  s.setAttribute("data-identity", "off");
  s.setAttribute("data-url", "strip");
  document.head.appendChild(s);
})();
</script>

Fire it on a Page View trigger for the hosts in your ad path.

Content Security Policy

Allow https://cdn.trylapis.com in script-src and https://api.trylapis.com in connect-src. From v2.2.1 the pixel sends events to that one host only.

Check it

  1. Add data-debug to the tag (or s.setAttribute("data-debug", "") in Tag Manager) and open your browser console.
  2. Load a page with ad parameters, for example ?utm_source=chatgpt&lapis_campaign=test. You should see a page_view event.
  3. Click a few buttons and submit a form. No click, form_submit or identify events should appear, and no event should contain an email_sha256.
  4. Remove data-debug when you’re done.

FAQ

Does Lapis still read other ad platforms’ cookies?

Yes. Page views carry first-party ad cookies that are already on your site, such as _fbp and _gcl_aw, so a visit can be matched to the platform that sent it. They are identifiers set by those platforms, not page content.

Can I turn the mode on for some pages only?

Yes. Put data-lapis-no-track on the element that wraps the sensitive screens instead of on <html>. Everything outside it is recorded as usual.

What does Lapis lose in this mode?

The drop-off view inside your pages: which buttons visitors click and where they abandon a form. Attribution of conversions to ads is unchanged, as long as your backend sends them.

Was this page helpful?