This page shows the exact HTML you need on your site: the loader tag and a download link. The loader here ships without a public key on purpose — add your own when you integrate.
Place this near the end of your <body>
on pages that
host download links.
<script src="/plugin.js" data-key="" data-api="https://ashtonx24-inkdna.hf.space" data-observe='a[href*=".pdf"],a[data-inkdna]' data-mode="loose" async></script>
data-key
empty keeps this
example inert. On your site, paste your public key prefix (not the full
secret).
Tip: use data-inkdna-order
or ?order=
so your
download carries a verifiable Order ID.
Use a normal anchor. Add data-inkdna
and (optionally) an
order ID.
<a href="/assets/sample.pdf" data-inkdna data-inkdna-order="ORDER-123">Download your PDF</a>
That’s it. When a visitor clicks, the loader requests a fingerprinted copy for this asset (and carries your order ID if provided).
Download (attribute) Download (?order=…) Docs: dynamic Order ID
Add data-inkdna-order
to the link:
<a href="/assets/sample.pdf" data-inkdna data-inkdna-order="ORDER-123">Download</a>
Append a query param your platform already knows (the loader understands these):
/assets/sample.pdf?order=ORDER-123
Accepted keys: order
, order_id
,
order-received
, oid
Run this tiny script on your “thank you / order complete” page—no HTML edits:
<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"],a[data-inkdna]').forEach(function(a){ a.dataset.inkdnaOrder = ord; }); } })();</script>
order-received
param. This one-liner is enough:
<script>(function(){ var q=new URLSearchParams(location.search); var ord=q.get('order-received')||q.get('order')||''; if(ord) document.body.dataset.inkdnaOrder=ord; })();</script>
If your platform exposes the order on thank-you pages, this helper shares it with all links:
<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"],a[data-inkdna]').forEach(function(a){ a.dataset.inkdnaOrder = ord; }); } })();</script>
Click any screenshot to enlarge. Use ←/→ to navigate, Esc to close.