inkdna-fingerprint Documentation

Last updated: 2025-09-22

Stamp a low-visibility forensic grid at download and prove lineage later — no DRM, no PII stored.

Quick start (any site)

  1. Claim your key at /claim.html.
  2. Add your domain on the claim page.
  3. Paste the loader on your site:
<script src="https://inkdnafingerprint.com/plugin.js"
  data-key="pk_XXXX"
  data-observe='a[href*=".pdf" i],a[data-inkdna]'
  data-mode="loose" async></script>

WooCommerce

Download plugin (ZIP)

Other platforms

While we provide a Woo plugin and a simple CDN loader snippet, other platforms that allow inserting the loader script will work too. We focus engineering effort on the CDN loader and Woo integration; reach out if you need a custom integration.

Example integration

Exact HTML you can drop onto a site that serves downloadable PDFs. This shows the loader, a sample download link, and a few ways to make sure an order token (order id) is included when files are stamped.

1) Include the loader

Place this near the end of your <body> on pages that host download links.

<script src="/plugin.js"
  data-api="https://your-inkdna-api.example"
  data-key="pk_XXXX" 
  data-observe='a[href*=".pdf" i],a[data-inkdna]'
  data-mode="loose" async></script>

Note: the loader requires both data-api and data-key to run. If either is missing (for example leaving data-key empty), the loader will warn in the console and will not run — useful for a non-live demo page.

2) Your download link

Add data-inkdna to your normal PDF anchor and — ideally — a per-order token via data-inkdna-order:

<a href="/assets/sample.pdf" data-inkdna data-inkdna-order="ORDER-123">Download your PDF</a>

When clicked, the loader sends the asset and the detected order token (if present) to your inkdna API to request a stamped PDF.

Important: What happens if no order token is found?

The loader does not invent an authoritative order id on the client. If no order token is detected, the loader still calls the server's /claim endpoint (sending context such as page url and user-agent). The server is responsible for issuing the internal token used for that stamped copy and for recording minimal, non-PII metadata. For strongest legal attribution you should render a unique order token server-side and expose it to the loader (see patterns below).

3) How to pass an Order ID (pick ONE)

a) Explicit attribute (works anywhere)

Add the order token directly to the link:

<a href="/assets/sample.pdf" data-inkdna data-inkdna-order="ORDER-123">Download</a>

b) URL parameter (no HTML changes)

If your platform already appends an order id in the download URL, the loader will detect these query keys:

/assets/sample.pdf?order=ORDER-123
/assets/sample.pdf?order_id=ORDER-123
/assets/sample.pdf?order-received=ORDER-123

Recognized keys: order, order_id, order-received, oid.

c) Page hint — auto-share one order to all links (helper snippet)

On thank-you or order-complete pages you can add this small snippet. It finds common order elements or query params and copies the value into all PDF links so the loader can pick it up.

<script>(function(){
  var el = document.querySelector('#orderNo, .order-number, [data-order-number]');
  var ord = el ? (el.textContent || el.value || '').trim() : '';
  if (!ord) {
    var q = new URLSearchParams(location.search);
    ord = q.get('order') || q.get('order_id') || q.get('order-received') || q.get('oid') || '';
  }
  if (ord) {
    // publish at body level and copy to any PDF/download anchors
    document.body.dataset.inkdnaOrder = ord;
    document.querySelectorAll('a[href*=\".pdf\" i],a[data-inkdna]').forEach(function(a){
      a.dataset.inkdnaOrder = ord;
    });
  }
})();</script>

This snippet is intentionally minimal and safe — it only reads visible page content and query params and writes a data-inkdna-order attribute to anchors. It does not access any backend or sensitive data.

4) Notes & best practices

If you use WooCommerce, the plugin automates order mapping on the thank-you page — see the “Woo Plugin Setup Walkthrough” images below for visual steps.

Passing a dynamic Order ID

Order IDs make takedowns provable. The loader auto-detects them from attributes, URL params, or page hints. Use one of these:

Explicit (recommended)

<a href="/files/ebook.pdf" data-inkdna data-inkdna-order="ORDER-123">Download</a>

Auto from page (generic)

<script>(function(){
  var el = document.querySelector('#orderNo, .order-number, [data-order-number]');
  var ord = el ? (el.textContent || el.value || '').trim() : '';
  if (!ord) {
    var q = new URLSearchParams(location.search);
    ord = q.get('order') || q.get('order_id') || q.get('order-received') || q.get('oid') || '';
  }
  if (ord) {
    document.body.dataset.inkdnaOrder = ord;
    document.querySelectorAll('a[href*=".pdf" i],a[data-inkdna]').forEach(function(a){
      a.dataset.inkdnaOrder = ord;
    });
  }
})();</script>

Woo (thank-you)

<script>(function(){
  var p=new URLSearchParams(location.search);
  var ord=p.get('order-received')||p.get('order')||'';
  if(ord) document.body.dataset.inkdnaOrder=ord;
})();</script>

Verification (in Woo or API)

# curl example
curl -H "X-API-Key: ink_live_xxx" -F file=@marked.pdf https://ashtonx24-inkdna.hf.space/detect/guess

Copy curl

Public demo (safe to try)

Use this demo key on Verify to check our stamped sample.

Demo key: demo_live_d12KIiDxdoLLScgy9Suexow3m9oFAAwS

Download BEFORE.pdf Download AFTER.pdf Open Verify

This key only works on AFTER.pdf and cannot mark.

Stamped files include a faint forensic grid that slightly darkens pages; reading remains normal. Optional canary text (a small visible footer) may be enabled in sandbox/demo to confirm stamping; verification does not depend on it. It will be demolished post beta.

API used by the loader

POST /claim

GET /fp?token=…

POST /events

Troubleshooting

FAQ — Verification requirements

Do I need to pass an order ID?
Yes. For attribution (pinning a leak to a buyer) you must either: (A) generate the stamped PDF for that specific order, or (B) include the original order_id parameter when calling the Verify API. Without an order context, verification may return a low confidence score and will not produce an attribution result.

For your convenience, we also provide a system that can guess the order ID from the fingerprint alone. However, this is not as reliable as supplying the order ID you suspect. When you do provide an order ID and use /detect/guess, the system will first attempt to match the fingerprint. A mismatch between the fingerprint and the order ID may result in a lower confidence score. Please be aware of this limitation when interpreting results.

What if I call Verify without an order ID?
You can still run detection, but expect lower confidence and no guaranteed attribution. In short: don’t rely on Verify to find a matching order unless you supply the order context.

Do screenshots / images work?
Yes — we support full-page screenshots and full-page image captures. Detection on full-page screenshots was tested and is supported. Partial, heavily cropped, or very low-resolution images are lossy and may reduce accuracy.

Quick curl example (include order_id)

curl -H "X-API-Key: <your_key>" \
  -F file=@leaked.pdf \
  -F order_id="ORDER-12345" \
  https://ashtonx24-inkdna.hf.space/detect/guess

Summary: stamp per order or pass order_id on verify → reliable attribution. No order context → expect lower scores and no attribution.