On-page rendering
The SDK fetches prepared markup by article_id and domain, then carefully inserts links and mini-offers into the DOM.
Website
SDK 1.0.12On websites, integrations are applied automatically through the SDK. Connect the script, set configuration parameters, and provide access to article content.
The SDK fetches prepared markup by article_id and domain, then carefully inserts links and mini-offers into the DOM.
The system needs article text: prefer RSS/API; otherwise public-page parsing; or run matching manually in the cabinet.
Preferred option: we discover new posts faster and prepare relevant integrations.
If there is no RSS — provide a section URL and an example page with full article body.
Matching starts only when the author runs it in “Integration matching”.
Load the SDK once per page. Each new article needs its own content DOM block and article_id. You do not need to re-initialize the SDK.
Current @linkitbe/sdk package version.
The partnerApiKey is issued in the author cabinet after the property is set up.
<script>
window.LinkItBeConfig = {
partnerApiKey: 'your-partner-api-key',
};
</script>
<script
src="https://cdn.jsdelivr.net/npm/@linkitbe/sdk@1.0.12/dist/linkitbe_sdk.min.js"
integrity="sha384-Ww6R1ZxdWrEQUloQS0ukxhxFHaOKNexPnwFKHGvgTGi9uTT9lKqt0pYylrcZmJLN"
crossorigin="anonymous"
async
></script>
Call processing for a new block:
window.LinkItBe.initArticle(articleId, contentBlock);
For infinite feeds, enable enableFeedAutoProcess and provide the feed root, content selector, and article id resolver.
<script>
window.LinkItBeConfig = {
partnerApiKey: 'your-partner-api-key',
contentSelector: '[your-content-selector="content_block"]',
articleIdResolver: function (contentBlock) {
// your article Id Resolver, for example:
// const firstP = contentBlock.querySelector('p[id]');
// if (!firstP) return null;
// const idMatch = firstP.id.match(/^(\d+)_/);
// return idMatch ? idMatch[1] : null;
},
enableFeedAutoProcess: true,
feedObserverRootSelector: 'your-feed-root-selector',
};
</script>
<script
src="https://cdn.jsdelivr.net/npm/@linkitbe/sdk@1.0.12/dist/linkitbe_sdk.min.js"
integrity="sha384-Ww6R1ZxdWrEQUloQS0ukxhxFHaOKNexPnwFKHGvgTGi9uTT9lKqt0pYylrcZmJLN"
crossorigin="anonymous"
async
></script>