Skip to content
Pitchlane API

Guide

Host Pitchlane on your own website

Choose a query or path video ID, install the matching SDK tag on your CMS page and test a recipient link without tracking.

Website hosting requires account access and the website-hosting entitlement.

Before changing a campaign with links already sent: saving immediately redirects its existing Pitchlane watch links to the new site, even if the player is not installed yet. Install and test on an unsent campaign with a rendered test video first. Switch the live campaign only after the player works with the same site and video-ID format.

An untouched campaign may still show Customize Landing Page in the setup sidebar, even when your account has access. In that case, ask your Pitchlane MCP agent to set the destination on the unsent test campaign first. The agent uses update_campaign with landing_page_hosting.mode = "external" and an HTTPS landing_page_hosting.baseUrl, then fetches the installation with get_campaign. Reopen the campaign to see Video page hosting. If your account does not have access, keep the standard settings; nothing changes automatically.

  1. On the unsent test campaign, open Video page hosting in the setup sidebar and select Host on my own website.
  2. Enter the HTTPS page you control and choose where the link carries its video ID.
  3. Choose the campaign fields to expose under Data visible to visitors, then save.
  4. Use Copy installation. Put the script in the page head and the player element in the page body. Your Pitchlane agent can also get both the installation HTML and the example link via get_campaign (landingPageInstallation.html and landingPageInstallation.exampleUrl).

The example uses Sample_01 to show the URL format, not a playable video. Use a real rendered video link for playback. Choosing this mode does not assign a Pitchlane template and does not re-render videos. Your site owns the page, layout, calls to action and calendar, not the campaign’s standard page settings. A Pitchlane Custom Domain is different: it serves Pitchlane’s Viewer under your brand and does not require the SDK.

After saving, existing Pitchlane watch links for this campaign redirect to the configured site. Newly generated recipient links use the saved destination. Links already sent directly to a website cannot be rewritten by Pitchlane. If you switch sites or change the ID format, get a fresh installation and test it before sending. A Pitchlane-hosted template does not use a CMS installation tag.

Anyone with a working video link can read the values you expose, even if your page does not display them. Select only the fields you intend visitors to see. The SDK also receives public video/playback metadata, not the complete lead record. This includes video.title even when no lead fields are enabled, and a title can contain a prospect’s first name. Review the video titles separately before switching. Standard aliases such as commonData.firstName are populated only when the corresponding campaign field is exposed and has a value.

Pick one format. The campaign URL, the recipient link and the SDK tag must agree. Use the SDK URL from Copy installation for your environment. Install the matching classic synchronous script once in the head, before code that uses pitchlane. The examples below show production URLs.

Default query

Campaign URL: https://www.example.com/video. Recipient link: https://www.example.com/video?__plvidid=Sample_01.

<script src="https://static.pitchlane.video/sdk/v1/pitchlane.js"></script>

Custom query

Campaign URL: https://www.example.com/video. Recipient link: https://www.example.com/video?clip=Sample_01.

<script src="https://static.pitchlane.video/sdk/v1/pitchlane.js" data-pitchlane-id-query="clip"></script>

Path parameter

Campaign URL: https://www.example.com/video/:videoShortId. Recipient link: https://www.example.com/video/Sample_01.

<script src="https://static.pitchlane.video/sdk/v1/pitchlane.js" data-pitchlane-id-path="/video/:videoShortId"></script>

The v1 friendly URL follows compatible builds. An installation that needs fixed bytes can use an approved immutable build URL instead. Do not self-host just the entry file: the matching player JS and CSS are fetched relative to it.

Put the player on the page

<h1>A video for <span data-pitchlane-text="commonData.firstName">you</span></h1>
<div data-pitchlane-player></div>

Text bindings fill a supported leaf element using plain text, keeping its original text as the fallback. The SDK never runs Liquid on a CMS. For dynamically inserted content, call pitchlane.bind(container) after insertion. Use a full navigation for each new video ID.

To test without tracking, add dnt=1 using URLSearchParams; preserve the video ID and other query parameters. DNT never blocks playback. For manual consent add data-pitchlane-consent="manual" to the installed script (on a hosted template put it on the html element). From your CMP’s analytics decision callback, call:

function onAnalyticsStorageChanged(analyticsStorage) {
  pitchlane.setAnalyticsConsent(analyticsStorage === "granted" ? "granted" : "denied");
}

The SDK does not read a private Google consent API. Your implementer decides whether to connect the CMP. Forward initial consent and changes; start in manual mode to avoid sending anything before consent. Denial drops queued observations. A later grant never overrides URL DNT and does not replay withheld events.

Troubleshooting

  • No ID: the generic page stays generic. Open a real recipient link, not only the base URL.
  • 404 on a path link: configure the CMS to serve the page on a direct navigation to the full path, preserving it in the browser. A client-side link working from the home page is not sufficient.
  • Player unavailable: check the campaign’s saved origin (scheme, host, port), ID format and snippet. A foreign origin cannot retrieve a session. Do not put an API key or a recipient grant in the page.
  • Blocked assets: allow the configured SDK origin for script and style, embed API origin for connections, and authorized media hosts in your site’s CSP. Check the browser’s blocked resource rather than disabling the policy.
  • Personalization missing: check the campaign field exposure, the exact schema key and the leaf text fallback. Do not embed a whole lead record.
  • Switched modes or changed the URL: update the CMS snippet too. A sent link to a customer domain cannot be rewritten by Pitchlane. A template preview does not test that site’s routing or CSP.

SDK methods, events, variables and recipes.