Inject Strategy
Unlock premium modules directly inside the article
Keep readers in context while monetizing high-value fragments after commitment resolution.
Ideal for premium charts, images, analysis sections, or bonus embeds that should appear in place.
Developer Kit
Source on GitHub | gvm.js documentation
Minimal inject snippet
<!-- 1) Inject gvm.js SDK -->
<script src="https://esm.sh/@wdft/gvm-sdk@latest/gvm.js" type="module"></script>
<!-- 2) Initialize gvm on body -->
<body data-gvm data-gvm-tenant="your_tenant" data-gvm-env="qa">
<!-- 3) Declare payment template (modal) -->
<template data-gvm-template="payment" data-gvm-template-inject-to="body">
<dialog open>
<span data-gvm-bind-qr></span>
<button data-gvm-bind-send-sms>Open SMS</button>
<button data-gvm-bind-cancel>Cancel</button>
</dialog>
</template>
<!-- 4) Declare payment item (inject content) -->
<kbd data-gvm-reference="module-001" data-gvm-price="0.88"
data-gvm-template-name="payment"
data-gvm-http-inject="/inject/content.html"
data-gvm-http-inject-to="#premium-slot">Unlock module</kbd>
<div id="premium-slot"></div>
</body>
The gvm.js inject strategy is built for selective monetization. You keep the main article public while charging only for specific high-intent content blocks.
-
Swan in the lake See image
After successful payment, gvm fetches protected markup and inserts it into your target node, so your existing layout and reading flow stay intact.
Like other strategies, duplicate commitments are resolved automatically for the same number and reference, which helps reduce friction for returning buyers.