Account Engagement tracking code and cookies

Account Engagement's two tracking implementations, the cookies the code sets, their duration, tracker domains and tracking opt-in.

Someone pastes a fragment of code into a page of the site and, from that moment, Account Engagement knows who has been there. What exactly is that code, what does it leave in a visitor’s browser, and which of the two implementations Help documents separately is in force in the business unit being configured?

What the tracking code is

The tracking code is defined by three of Help’s own sentences: each Marketing Cloud Account Engagement (formerly Pardot) campaign has its own, unique; it is added to a web page to track visitor and prospect activity; and it is pasted into the page’s HTML “before the close body tag”, just before the document body closes. And it is that code that sets the visitor cookie: “This cookie is set for visitors by the Account Engagement tracking code”. What language the code is in, Help does not say, and neither does this page.

That gloss is new: until today the term was glossed in the prospect model, whose note declared that none of its sources defined it. That page still owns identity — the visitor, the anonymous visitor, the prospect (“cliente potencial” in Help’s Spanish) and how one becomes the other; here is the piece that makes it possible.

Two implementations, documented separately

Help has no article called “the tracking code”. It has two, with different headings, different procedures and different places to copy the code from. Which one is in force is not deduced from anybody’s browser: it is read in the business unit.

First-party Third-party
Its article “Implement Tracking Code”, with the notice “This process implements first-party tracking code” “Implement Tracking Code for Third-Party Cookies”, which opens with “If you still use third-party tracking, you can copy the code and place it on your web pages”
By default Enabled in business units created after 13 February 2023. What applies to a unit created on exactly that day is not stated by any cited source In those created before, as long as an admin does not enable first-party tracking
Where the code comes from Admin and Domain Management, scrolling to the Tracking Code Generator and selecting the domain; the domain’s default campaign can be overridden The Campaigns page, opening the campaign and clicking View Tracking Code
What it requires first That tracker domains have a default campaign, and the default domain go.pardot.com is no longer used Nothing the cited sources document
Which pages to put it on Both recommend the same: high-value pages only, such as landing pages or specific product listings, and not the site’s home page. It is a recommendation, not a limit: no cited source gives a maximum Same
Who can view it “Account Engagement Administrator or Marketing role” in both. Everything else on this page needs the Administrator role Same

Does Help say that one supersedes the other? It does not. It recommends the first: “To protect the privacy of your prospects and provide a more secure browsing experience, upgrade your business unit to use first-party tracking”. And it puts the reason outside the product: “To protect consumers’ privacy, web browsers are moving away from supporting tracking visitor activity with third-party cookies”. But no cited source gives a retirement date, or says that third-party tracking stops working, or declares it deprecated. So the split is this: first-party is the default implementation and the recommended one; third-party is the earlier one, is still documented with a complete procedure, and no cited source declares it superseded. The word “Upgrade” in an article title is a hint, not a citation.

And the two kinds of cookie are not exclusive: “Account Engagement sets first-party cookies for tracking purposes and sets third-party cookies for redundancy”. The condition that decides which is used is this: “If you don’t have a tracker subdomain configured, we use third-party cookies on HTTPS pages”. That is why the tracker domain is not a networking detail. During the change Help asks that the earlier one not be switched off — “For best results, enable third-party cookies during the transition to full first-party tracking” — and beside Enable first-party tracking there is an Enable third-party cookies checkbox, to attribute activity correctly when an asset’s tracker domain is changed.

About browsers this page says no more than that sentence, which is Help’s: no browser, no version, no blocking date, because no cited source prints them.

Which tracking implementation is in force and where its code comes fromA business unit created after 13 February 2023 uses first-party tracking by default. If it was created before, an admin has to enable it, and until they do the unit stays on third-party cookies. With first-party tracking, each tracker domain needs a default campaign and the code is copied from the Domain Management page, in the Tracking Code Generator. With third-party cookies, the code is copied from the campaign, with the View Tracking Code button.created after2023-02-13created beforeyesnoBusiness unitFirst-partyby defaultDoes an adminenable it?Third-partycookiesDefaultcampaign onthe domainCode: DomainManagementCode: thecampaign

The cookies it leaves, and how long they last

There are five, and Help names them one by one. None stores personal data: “We don’t store personally identifying information, only a unique identifier”.

Cookie What it does, according to Help
visitor_id<accountid> The visitor cookie. It carries a unique visitor ID and the business unit’s identifier, which is what makes sure the visitor is tracked on the correct unit. It is the one the tracking code sets
pi_opt_in<accountid> Only if tracking opt-in is enabled. It is true if the visitor opts in, and then they are cookied and tracked; it is false if they opt out or ignore the banner, and then the visitor cookie is disabled and they are not tracked
visitor_id<accountid>-hash A security measure: it carries the account ID and a unique hash, so that nobody can fake a visitor and access the corresponding prospect information
lpv<accountid> It keeps multiple page views of a single asset from being tracked over a 30-minute session: if someone reloads a landing page several times in that period, each reload does not count as a page view
pardot A session cookie, set while there is a user session or when a visitor accesses a form, a landing page or a page with the code. It denotes an active session and is not used for tracking

The duration is configured in Max Tracking Cookie Duration (days), in the unit’s settings, and reaches only two of the five, the duration “of visitor_id and pi_opt_in tracking”. The starting value is worth having exact: “The default duration is set to 365 days”. Changing it forces no waiting, because the cookie is updated when the visitor next passes through a page with the code. The field’s maximum and minimum, and the duration of the other three cookies, are in no cited source.

One name Help writes in two ways, recorded rather than resolved in silence: the cookies article calls the fourth one “This LPV cookie” and names it lpv<accountid>; the article cited by Scoring and Grading calls it “The LVP cookie”. LPV is written here, which is the specific article’s form and the real name’s. Neither expands the initialism.

The tracker domain and its HTTPS

A tracker domain is the organisation’s own subdomain with which Account Engagement rewrites links and the vanity URLs of marketing assets. Setting it up is not one screen.

Step What Help asks for
CNAME record (canonical name), the one that makes one domain name point to another For the chosen subdomain, pointing to go.pardot.com. With the IT team or the hosting provider
TXT record The validation keys, on the root domain. With the same team
DNS (domain name system) propagation, the system that resolves domain names Up to 24 hours
Validation From Domain Management, on the domain’s gear icon
And then Change the default protocol to HTTPS, and after that add the code on the pages
And never Mix HTTPS and HTTP links in a campaign: visitor activity is attributed incorrectly
And better never Change an asset’s tracker domain: “Changing the domain resets cookies and visitor data isn’t linked between the old and new tracking domains”. If it must be done, the only documented way out is to enable third-party cookies

The rule that decides how many domains and under which root is this: “First-party cookies don’t track across domains, but they can track across subdomains of the same root domain”. Hence the advice to use a single tracker domain, or several subdomains of one root, for a campaign’s assets: go1.site.com and go2.site.com, not go.siteA.com and go.siteB.com. And the consequence that counts records: a visitor record is created when someone lands on a tracked page or a tracker domain, and if the same person later reaches another root domain a second record is created, even if that page is a parent or subdomain of an already-tracked URL.

Unit created before 15 February 2021 Unit created after
The cut-off Help splits by “before” and “after” that date, and does not say what applies to a unit created on exactly that day Same
SSL certificate Can be enabled for all new domains as they are validated, or by hand domain by domain Created automatically for all domains, and “the behavior can’t be changed”
Default protocol Can be left on HTTP or moved to HTTPS; Help recommends HTTPS All on HTTPS
How long it takes by hand Typically about 15 minutes, as shown by the SSL Status column Not applicable

SSL is Secure Sockets Layer, which Help says encrypts the link between server and browser. Who issues the certificate does not depend on the date: it is Let’s Encrypt in both cases, and hence a networking condition. If the domain uses CAA records (certificate authority authorization, the DNS records that declare which authority may issue certificates for a domain), one must be added for letsencrypt.org or the certificate cannot be issued. And the warning two articles repeat word for word: a domain that defaults to HTTPS and serves unsecured content gives the visitor security warnings, and the page does not render correctly.

When the browser doesn’t allow third-party cookies

Help devotes a section of its own to this inside the visitor-tracking considerations, and lists three consequences for the first-party approach.

What stops working Scope
Tracking across subdomains Activity isn’t tracked across subdomains of the same root domain
Progressive profiling and form prefill They don’t work across subdomains either. What they are is defined by no cited source: they belong to the forms and form handlers page
The link when the domain changes When an asset’s tracker domain is changed, cookies are reset and visitor data can’t be linked

Apart from that, and not depending on the browser, there is a behaviour that belongs to this page because it is about the cookie: “Embedded forms and hosted forms on web pages don’t create a visitor cookie”, and embedded and standalone forms do not record form views on the first visit to a domain either. Help recommends a landing page and, if that is not possible, a custom redirect — a term the cited sources do not define — to create the cookie before the page loads.

Permission can be asked before anyone is tracked, and Help documents three distinct pieces.

Piece What it does, according to Help
Tracking opt-in First-time visitors are asked to consent to tracking cookies, and the message does not appear again unless they clear their cookies. Without consent, page views and form views aren’t tracked; email link clicks and form submissions do stay in their activity history. Enabled by default in units created after 13 February 2023. It is edited in Domain Management, with Edit Tracking Opt-In Preferences, and the message and its CSS styles can be changed. To remove the banner, Help documents a route that is not the one you would look for: select “Request opt-in if visitor comes from specific countries” and select no countries
Retroactive first-touch tracking To respect privacy, cookies aren’t added the first time someone clicks a custom redirect, a social click or an email link; this option recovers that first touch’s attribution after the prospect consents. Enabled by default, and it can be disabled in the settings
Tracking and consent API — API is application programming interface — Functions for each step in the page view tracking process. It is activated in the unit’s settings with Activate the Tracking & Consent JavaScript API, and a developer implements it

Two declared gaps: the retroactive first-touch article does not say on which settings screen it is disabled, and this page summarises no functions of the API, because the developer guide its article links has not been verified here.

Visitor filters

A visitor filter excludes certain visits, clicks or other actions from campaign results and email notifications; the common use, Help says, is to exclude the company’s own IP address to avoid skewing reporting. It is created in Admin, Automation Settings, Visitor Filters, by IP address or by hostname, with wildcards to cover a range or several subdomains.

What to know about a filter What Help says
What it reaches Visitors, visits, visitor activities, visitor page views, email clicks and email opens
What it never filters Clicks on the unsubscribe link in the body of emails. If a bot or a security scanner clicks it, that prospect is unsubscribed
From when For new visitors, immediately. It evaluates visitors from the previous 90 days, but activities and visits from those 90 days aren’t affected; all future activity of those visitors is
What stops firing “autoresponders, notifications, email completion actions, and other actions, including scoring actions”, associated with filtered activities. The list is Help’s; those terms belong to other pages and are not defined here
By hostname It filters the domain of the visitor hostname, not the prospect’s email domain
The ones already there Some system ones, with the [PD-SYS] prefix, which remove email security scanner activity. They can be removed
Deleting it Takes effect immediately and cannot be restored

Outside this page

Three neighbouring subjects do not belong here. The visitor, the prospect and how one becomes the other belong to the prospect model, which also documents which prospect a form’s activity goes to. The hosted form, the form handler and the setting with which a form chooses not to cookie a visitor belong to the Account Engagement forms and form handlers page. And the score belongs to Scoring and Grading.

Example: a private bank’s website

A private bank wants to know which pages are visited by the people who later request a meeting, without collecting anything without consent. Invented case; the order is this page’s proposal, not Help’s.

  1. Check which implementation is in force in the unit’s settings, by its creation date.
  2. One root domain only, with one or more of its subdomains: each new root creates a second visitor record.
  3. A default campaign on each domain, which is what first-party requires before the code can be generated.
  4. HTTPS on the domain and in the links, because mixing protocols attributes activity incorrectly.
  5. Ask for consent with opt-in, accepting that without it there are no page views and no form views.
  6. Filter the offices’ IP address, knowing that it does not affect already-recorded visits.
  7. Decide the cookie duration before measuring, because it starts at 365 days.

The example promises no more than its steps produce: it does not say how many visitors will end up identified, and it does not resolve the case of someone arriving from two different root domains, which produces two records.

What to decide, and on what criterion

No source publishes a decision table: the split into rows is this page’s reading, and each row quotes what Help does say.

Decision When yes, when no, and on what criterion
Move to first-party tracking Yes: it is what Help recommends, and it is the default state of new units. No cited source gives a case for staying on third-party. The criterion: it requires a default campaign on every tracker domain, so the real question is whether those domains are ready. Whether it can be disabled afterwards, no cited source says
Leave third-party cookies enabled Yes during the change, which is what Help asks, and if an asset’s domain has to change, because that is the only way out it documents for not losing the data link. No, no cited source gives a case. The criterion: is any tracker domain going to change?
How many tracker domains One, or several subdomains of a single root. Never two different roots for the same campaign. The criterion: each new root is a new visitor record for the same person, and that cannot be undone
Enable tracking opt-in Yes when prior consent is needed; it comes enabled in new units. No is not a free decision where the applicable rules require that consent. The criterion: what is lost is bounded and Help says so, page views and form views, not email clicks or submissions
Change Max Tracking Cookie Duration Yes when the data policy asks for the cookie to be kept fewer than 365 days. No cited source supports a reason to raise it. The criterion: it reaches only visitor_id and pi_opt_in, and the change applies when the visitor next passes through a page with the code
Create a visitor filter Yes for the organisation’s own IP address, which is the use Help gives as common. No without measuring the scope first, because a filter switches off autoresponders, notifications and scoring actions for the filtered activity. The criterion: deleting it takes effect immediately and cannot be restored

Before production

  1. The implementation in force checked (see “Two implementations, documented separately”).
  2. A default campaign on each domain before generating the code (see “Two implementations, documented separately”).
  3. Domains under a single root, with CNAME, TXT and validation done (see “The tracker domain and its HTTPS”).
  4. HTTPS by default, and links and assets on HTTPS (see “The tracker domain and its HTTPS”).
  5. Opt-in decided and what stops being recorded accepted (see “Consent: opt-in, first touch and API”).
  6. The cookie duration decided (see “The cookies it leaves, and how long they last”).
  7. Filters created before measuring (see “Visitor filters”).

Official sources

Back to the knowledge base