Pasteboard
Pasteboard attribution carries the click id through the App Store boundary on the device clipboard. When a visitor taps your landing page's Get the app CTA, Attriv writes a URL-shaped payload — https://<your-link-domain>/c/<clickId> — to the clipboard. After the App Store detour, your app's first launch finds the payload, validates it, and claims the click: matchType: "pasteboard", a deterministic tier.
The payload is URL-shaped on purpose: it lets the SDK silently detect a recoverable link without reading clipboard contents. Claims are window-bounded and host-validated against your verified link domains server-side, so unrelated URL-shaped clipboard content can't claim attribution.
There are two ways the SDK can get the payload off the clipboard — they differ entirely in what the user sees:
The paste control — "control" (default, recommended)
Attriv.showPasteControl() renders a native card — your heading, your caption, and Apple's UIPasteControl system button (iOS 16+). UIPasteControl is a system-rendered control that delivers clipboard contents only on an explicit user tap: the tap is the consent, so no iOS paste prompt ever fires. The system draws the button itself — a localized "Paste" label plus the source app's icon, so the user can see the content came from Safari. No entitlements or Info.plist changes required.
Because the button is inert when the clipboard holds nothing compatible, gate it on the silent probe — the SDK returns shown: false, reason: "no_url" when there is nothing URL-shaped to recover. Show it while getAttribution() reports organic, hide it once attributed; a skipped button stays retryable across launches (unlike a denied prompt, "didn't tap yet" is recoverable).
Two privacy properties worth knowing:
- Clipboard content that doesn't carry an Attriv payload is validated and discarded on-device — nothing unrelated is transmitted.
- On iOS < 16 there is no paste prompt and no
UIPasteControl; the mode degrades to a plain read — still prompt-free by different means.
// Tap outcomes arrive via onPasteClaim — showPasteControl resolves once the
// card renders; a skipped card is normal and settles nothing.
Attriv.onPasteClaim(({ claimed, attribution }) => {
if (claimed) {
// attribution — route to link.data?.$deeplink_path
}
});
const attribution = await Attriv.getAttribution();
if (attribution.matchType === "organic") {
await Attriv.showPasteControl({
title: "Open the link that brought you here",
caption: "Your link is waiting on the clipboard — only the link is read.",
});
}
Positioning and customizing the card
The card is a native overlay rendered on top of the webview — not a DOM element. You cannot put it inside a <div> or style it with CSS, and it does not scroll with page content. What you control:
| Option | Effect |
|---|---|
title | Heading above the button — your text, your language |
caption | Subline under the heading — your explanation of what the button does |
displayMode | "iconAndLabel" (default), "iconOnly" or "labelOnly" — the system button's own look. Its label is always the localized "Paste"; it cannot be reworded |
x / y | Card top-left offset in CSS pixels from the webview's top-left — the same space getBoundingClientRect() returns. Defaults: horizontally centered in the safe area, ~70% down the screen |
width | Card width in CSS pixels (default 320), clamped inside the safe area with 16 px margins |
The card chrome (background, radius, fonts) follows the system theme — light/dark is automatic; custom colors are not supported.
"Placing it in a div" — the placeholder pattern
You cannot put the control inside DOM, but you can align it over one. Reserve a slot in your layout and measure it:
<!-- your page -->
<div id="attriv-paste-slot" style="height: 140px"></div>
const rect = document.getElementById("attriv-paste-slot")!.getBoundingClientRect();
await Attriv.showPasteControl({
x: rect.left,
y: rect.top,
width: rect.width,
title: "Open the link that brought you here",
});
This makes the card render exactly over the placeholder — to the user it looks like part of the page. Two rules follow from the overlay model:
- It does not scroll. If the user can scroll the placeholder away, hide the card (
Attriv.hidePasteControl()) or callshowPasteControl()again with fresh coordinates — repeated calls replace the previous card, so repositioning is cheap. x/yare CSS pixels measured from the webview's top-left — the same coordinate spacegetBoundingClientRect()returns, so the card lands exactly on the measured element.
Two typical layouts:
// 1. Bottom sheet style (default position) — good for the first screen:
await Attriv.showPasteControl({ title: "…", caption: "…" });
// 2. Inline with your UI — card sits exactly where the placeholder is:
const rect = document.getElementById("attriv-paste-slot")!.getBoundingClientRect();
await Attriv.showPasteControl({ x: rect.left, y: rect.top, width: rect.width, title: "…" });
Centering the card on screen
For a dedicated screen — e.g. a blank/white first-launch page whose only job is the claim — center a placeholder with CSS and let the card land on it. This is exact regardless of how tall the card turns out (title + caption length varies):
<!-- a full-screen page: white background, card dead center -->
<div
id="paste-screen"
style="height: 100vh; display: flex; align-items: center; justify-content: center; background: #fff"
>
<div id="attriv-paste-slot" style="width: 320px; height: 150px"></div>
</div>
const rect = document.getElementById("attriv-paste-slot")!.getBoundingClientRect();
await Attriv.showPasteControl({
x: rect.left,
y: rect.top,
width: rect.width,
title: "Open the link that brought you here",
caption: "Your link is waiting on the clipboard — only the link is read.",
});
Or without a placeholder — omit x (the card centers itself horizontally inside the safe area) and compute y from the viewport height. Card height depends on your copy (~120–180 px with title + caption), so subtract roughly half of it:
await Attriv.showPasteControl({
y: window.innerHeight / 2 - 80, // approximate vertical center
title: "Open the link that brought you here",
caption: "Your link is waiting on the clipboard — only the link is read.",
});
The placeholder version is more precise — y anchors the card's top, so the measured rect lands it dead center while raw math needs your card-height estimate to be right.
The automatic read — "read"
The legacy path, kept for maximum capture and for apps that can't host the button UI. On first launch the SDK silently probes the pasteboard's metadata (probableWebURL) — no prompt, no content access. If the clipboard holds a URL-shaped payload, the SDK performs the actual read, which fires one iOS paste prompt ("Allow pasting?"). If the user allows, the payload is claimed; if they deny, the click is lost — and under iOS's "Ask every time" setting the prompt can recur, which is exactly the prompt-galore the control mode avoids.
"control" vs "read" — the tradeoff
The two modes deliver the same payload; what differs is who owns the consent UX and what failure looks like.
"control" (default) | "read" | |
|---|---|---|
| Host app work | You render the button — one showPasteControl() call on your first screen, plus the heading/caption copy and the show-while-organic / hide-once-attributed lifecycle | None — the read is fully automatic at first launch |
| What the user sees | An in-app card with your explanation and the system paste button | An unsolicited system prompt ("Allow pasting?") with no context — iOS doesn't let anyone explain it |
| User perception | Contextual — looks like part of your app, states its purpose, shows the Safari icon where the link came from | Suspicious — a generic modal asking for clipboard access right after install is exactly what a clipboard-sniffing app would do, so users correctly can't tell the difference |
| Failure mode | Skipped — the user didn't tap yet; the button stays retryable across launches | Denied — the click is lost, and under iOS's "Ask every time" paste privacy setting the prompt can recur — prompt fatigue, not resolution |
| Coverage risk | Only converts users who notice and choose to tap — placement and copy decide the tap rate | Reaches every user holding a payload (the modal is unmissable) — but every one of them must trust a context-free prompt |
The psychology is asymmetric: the prompt is Apple's generic consent dialog — it can't say why your app wants the clipboard — so denials come from habit and suspicion, and there's no second chance. The control inverts this: you own the framing ("Open the link that brought you here"), the source-app icon legitimizes it, and "didn't tap yet" is recoverable forever.
The honest counterweight: "control" is only as good as the UI you put around it — a button buried on a later screen or captioned like a permission request will underperform. "read"'s forced attention is the one thing it has going for it; if your app genuinely can't host the button UI, it remains the fallback.
"both" and "off"
"both"— the automatic read at install, plus your app can offer the paste control for users who denied the prompt. Maximum coverage at the cost of the install-time prompt."off"— no pasteboard mechanics at all: the app ignores the landing page payload and touches no clipboard API;showPasteControlreturnsshown: false, reason: "disabled"(as it does in"read"mode — the control is only offered under"control"and"both").
Two things "off" does not change:
- Fingerprint matching still runs. It is always on and not configurable, so
"off"makes probabilistic matching the install path rather than removing it. See iOS attribution for the full picture. - The landing page still writes the payload on the CTA tap. That copy happens in Safari, outside your app's control, and is not gated by the
pasteboardoption —"off"means your app never reads it, not that the clipboard stays untouched.
Reliability under the hood
The payload lifecycle is built to survive hostile conditions: it is queued before it is consumed (persisted before the install POST, cleared only after a successful claim), so an offline first launch retries on the next launch instead of losing the click. Server-side, claims are bounded by the click's attribution window and the payload host must match one of your app's verified link domains.
What to do
| Mode | Host app work |
|---|---|
"control" (default) | Call Attriv.showPasteControl() on your first screen while attribution is organic — see SDK installation |
"read" | Nothing — the read is automatic at first launch |
"both" | Same as "control" — render the control for prompt deniers |
"off" | Nothing — no clipboard involvement; installs fall to fingerprint or organic |
Full method and option reference: API reference. For how the pasteboard composes with App Clips, see the iOS attribution overview.