PlanewardPlaneward Docs
PlanewardPlaneward Docs
Welcome
Sites overviewHeader and footerDark modeDomainsCollectionsRedirectsCrawlers and agentsLinked domainsExternal sites

Developers

REST APIAuthenticationWebhooksMCPEmbedded projectsTask description contentDeveloper hub

API

Sites

External sites

Count visits from a site hosted elsewhere, such as a Next.js marketing site, in your Planeward site's analytics.

A Planeward site can also count visits from a site you host somewhere else, such as a marketing site built with Next.js. Add that site as an external site and paste one script tag into it. Its visits then show in your Planeward site's Analytics like the site's own pages.

Set it up

  1. Open the site's Settings → Tracking → External sites.
  2. Add the other site's origin, such as https://example.com. A bare hostname becomes https://example.com. Only https origins are allowed, and each subdomain is listed separately. You can add up to 10.
  3. Copy the snippet shown in the settings and paste it into every page of the other site, for example in its root layout:
<script defer src="https://<your site's domain>/pw.js"></script>

Use your Planeward site's own domain in place of <your site's domain>. The snippet in the settings already has it filled in.

Changes to the list apply right away, with no publish needed. Your Planeward site itself must be published.

Referrer policy

The script's requests must carry the page's origin. Browsers send Origin: null instead when the page uses Referrer-Policy: no-referrer or same-origin, and a request from another site without a real origin is refused, so no visits or events are counted. Keep the browser default, strict-origin-when-cross-origin, or use origin-when-cross-origin. Check both the response header and any <meta name="referrer"> tag.

What the script does

  • Sends a pageview when the page loads, and again on every client-side navigation, so single-page apps like Next.js are counted page by page.
  • Uses the same first-party visitor cookie, pw_vid, on the other site's domain as a Planeward site does.
  • Carries the page's UTM tags and the referrer, so visits land under the right channel and campaign.
  • Adds pw_site and pw_vid to links that point to your linked domains, so signups and sales are still credited to the visit.
  • Loads the site's Meta pixel too, when the site has a Meta Pixel ID, and sends a PageView for each tracked pageview. If the page already loads its own Meta pixel, the script leaves it alone. Add the pixel in one place only.

Requests from origins that aren't on the list are refused.

Events

Besides pageviews, the script can count events you send yourself, such as a button click or a signup start. Call planeward.track with an event name and, optionally, a few properties:

planeward.track("cta_click", { cta: "hero", page: "/pricing" });

The script loads with defer, so a call made before it has loaded would fail. Queue those calls instead. The script sends them once it loads:

(window.planeward = window.planeward || { q: [] }).q.push([
  "cta_click",
  { cta: "hero", page: "/pricing" },
]);
  • Name: 1 to 64 characters, letters, numbers, and _ . : -.
  • Properties: an object with up to 10 keys. Each key is 1 to 40 characters, letters, numbers, and _ . : -, and not __proto__, constructor, or prototype. Each value is a string, number, or boolean, up to 200 characters.

An event that breaks these rules is dropped.

Events show in the site's Analytics tab, in the Events card: the 50 most sent events in the range, each with its count, unique visitors, and top 5 pages. Events are kept for 90 days, like the rest of Analytics.

Limits

Each site records up to 1,000 events a minute, each visitor up to 60 a minute on a site, and each IP address up to 300 a minute across all sites. Events over a limit are dropped.

Every tracker on the page gets the event

planeward.track sends the event to every Planeward tracker loaded on the page, not only to yours. If a page loads the /pw.js of two Planeward sites, both record its events, along with their properties. Load only trackers you control, and keep personal data out of event names and properties.

From an AI client

The list is externalOrigins on the MCP tools planeward-site-tracking-get and planeward-site-tracking-update.

Linked domains

Keep visitor tracking when people click from your site to your app or checkout on another domain.

CRM overview

See open deals and how money is moving.

On this page

Set it upReferrer policyWhat the script doesEventsLimitsEvery tracker on the page gets the eventFrom an AI client