Website visits tell Mokapen who lands on your site, which campaign they came from, and which pages they open — after they accept measurement cookies. It is not a second analytics tool you open on the side: when that person becomes a contact (a form, a link in an email), the pages they saw land on their card. Sales sees the path, not only “they submitted the form”.
It is not the form, and it is not a Mokapen page. The contact form collects people who write to you. You publish the site pages yourself (your CMS, or Mokapen pages). This guide is the snippet you put on the site and the report you read under Websites.
The point is simple: one script, consent comes from your site’s banner, and the data stays in the organization. No plugin for sales to learn, no Google Analytics export to paste into the address book.
The problem is not “knowing the site has visits”. It is that the visit lives in one tool and the contact in another. Mokapen closes the gap, but only with consent:
mkpTracking.consent(true). If the person refuses or withdraws consent, call mkpTracking.consent(false): Mokapen stops and deletes the cookies.In short: use visits to measure the site and attach it to people you already know. Use the form to collect people who write to you. Do not replace the cookie banner with a consent(true) line pasted under the script: that is tracking without a choice, and it is not what Mokapen publishes.
mkp_consent and mkp_vid) last 180 days, SameSite Lax, on your site’s domain (not on mokapen.com). It is not a third-party cookie.
On Tracking the first box is only this, with your organization’s slug in place of data-org:
<script src="…/js/tracking.js" data-org="your-org"></script>
Copy it with the button and put it in the header of every page you want to measure (or in Tag Manager, on a tag that fires on those pages). Do not shorten it, do not remove data-org: without that slug the events do not know which organization they belong to.
That script does not call consent. If you publish it alone, the report stays at zero until the banner says yes. That is intentional.
Below it there is a second box, an example, not something to paste into the theme as-is:
mkpTracking.consent(true);// mkpTracking.consent(false);
The first line goes where the visitor accepts analytics cookies. The second (uncommented) goes on refuse and on “withdraw consent”. On later visits, if the consent cookie is still there, the script starts again by itself: you do not call consent(true) on every page. Call it again only if the banner, on return, loads the page without the script until it re-reads the saved choice.
For an event that is not a page (a download, a button click) there is mkpTracking.trackEvent('name', { }). Same gate: without consent it does not send.
If you previously pasted a version that called consent(true) right under the script, that site still tracks everyone. Replace it with the current snippet and move the yes into the banner.
mkp_consent remembers the choice. mkp_vid is the browser identifier. They are not written before yes. With consent(false) Mokapen deletes both and stops sending pages. A second yes creates a new identifier: the previous path does not stitch itself back.consent(true) by themselves. You still need your own consent there, if you want that page counted.
Websites → Website visits. At the top, the range: 7, 30, 90 or 365 days (default 30). Four numbers:
mkp_vid cookie). The same phone for six months is one visitor, not one per day.Below, the tables:
If everything is empty, the snippet is not on the page, the banner does not call consent(true), data-org belongs to another organization, or you are looking at a period before you published.
Three paths, all with consent already given. Without consent there is no cookie to attach.
mkp_vid, Mokapen attaches the pages already seen to that contact and, if the email is new, creates the card the way the form always does. The form creates the contact; tracking does not create it on its own.mkp_et). On the first load with consent, Mokapen looks for a contact with that email. If it exists, visits are attached. If it does not, no “ghost” card is opened.mkpTracking.identify('email@…') does the same lookup: it links only if the email is already in the address book (Email 1, 2 or 3). Use it if the site login knows the email and the contact exists in Mokapen. Do not use it for “every email typed into a field” before submit: you are watching keystrokes and, if the email is not in the address book, you still do not get a lead.The contact’s origin stays the form’s (or however you created them). Visits do not rewrite the origin. If the person was already in the address book, the path is updated, the card is not duplicated.
Open the contact and the Website tab. If they never browsed with consent, it is empty: that is not an error.
When there is history you see a score (it stays 0 if you have no scoring rules: it is not the number to read before a call), then sessions and pages, first and last time, first and last source, and the latest pages (up to 30) with URL and date. It is what sales looks at before the call: “they were on pricing three times, last time yesterday, came from Google”. It does not replace the form log or the notes.
The organization report and the contact tab are not the same list. The report is everyone, including anonymous visitors. The tab is only that contact, after the link.
consent(true); refuse or withdraw → consent(false). Someone who already accepted is counted on their own, as long as the cookie is there and the script is on the page.consent(true) by itself.
The module always measures “pages seen with consent, then attached to a contact if you know them”. What changes is where the snippet sits and when you call consent. Do not use it to collect leads: that is the form.
consent(true) only if the person accepts that category. If they accept only the technical cookies, call nothing: Mokapen stays quiet. In the cookie policy paste the sentence from Tracking, not a made-up summary. After a week look at top pages: if the Contact page is missing, the snippet is not on that template.utm_source=google&utm_medium=cpc&utm_campaign=brand versus linkedin / cpc / b2b). In the report, first touch splits the two campaigns; last touch tells you if they came back from an email. Multi-touch only makes sense after those visitors submit the form: before that they are anonymous and they do not enter that table. Do not clone the form ten times just to “see the campaign”: the campaign is in the URL, the form can stay one.mkpTracking.consent.mkpTracking.identify(email). If the email is not in Mokapen, no contact is born: they have to enter first through a form, an import, or a record you create. Do not call identify on every keystroke of the signup form.
Websites → Tracking → copy the snippet → theme header (it stays there afterwards, not only for the first yes). In the banner, on the Accept button of the analytics category, add mkpTracking.consent(true). On Refuse, mkpTracking.consent(false). Publish. Open the site in a private window, accept, visit the home page and a landing page. Websites → Website visits → 7 days: at least one visitor and two pages. In the window where you refused you must not see a second visitor. If the number does not move, the script is not on that page or data-org is not the slug you are looking at.
The snippet is already there. You update the ad URLs with different utm, not the Mokapen code. The contact form stays one (see the form guide): you do not need a hidden field to duplicate the campaign if the utm is already in the URL. After a few submits, Website visits shows first touch by campaign and, for visitors who left an email, multi-touch. On the card, Website tab: the pages before the form. If everyone shows up as direct, the utm never reach the landing page (a redirect strips them, or the click goes through a shortener that drops them).
In the banner, the “edit preferences” link must be able to call consent(false). After that click, reload a page: /track/pageview must not fire, and the cookies mkp_consent and mkp_vid are gone. Pages already stored in Mokapen stay (up to 13 months); they are not deleted by the refusal. What stops is the future. If the person accepts again, they are a new visitor: do not promise in the notice that “the profile is stitched back together”.
Q: I copied the snippet and the report is zero.
A: The snippet does not track by itself. You need mkpTracking.consent(true) after acceptance, the right data-org slug, and a report range that includes today. Also check that you are on the plan with tracking.
Q: Can I also paste the consent(true) line under the script, so I start immediately?
A: No. That line is the example to bind to the banner. Putting it in the theme records everyone, including people who did not choose. If you already published it, remove it.
Q: Does tracking create the contact?
A: No. The contact is created by the form, an import, or a manual record. Identify and the email click attach visits only if the email is already there. An anonymous visitor stays anonymous.
Q: Form submitted, Website tab empty.
A: Either they had not accepted cookies before submitting, or the snippet was not on the form page, or the form is on a domain where the cookie is not present (another site, without the script). The form submit is still valid.
Q: Which cookies do I have to declare?
A: mkp_consent and mkp_vid, 180 days, on your domain, only after yes. The ready sentence is in Websites → Tracking, under the example. Do not declare cookies that start before the banner: with the current snippet they do not.
Q: Does a refusal also delete history already in Mokapen?
A: No. It deletes the cookies on that browser and stops later visits. Events already received stay for about 13 months. The contact, if there was one, stays in the address book: refusing analytics is not deleting the card.
Q: What is multi-touch for, if first touch is enough?
A: First touch is the entry campaign. Last touch is the last URL. Multi-touch spreads the credit across the visits of someone who later became a contact, so a person who came from ads and then from email is not entirely attributed to the last click. While they are anonymous, that table does not count them.
Q: Is this the same as the contact form?
A: No. The form collects the fields and creates or updates the card. Visits measure pages. They meet on submit, if there was consent. Form guide: Contact form.
Need help?