Overview
Outbrain's JS widget is the most commonly used integration type. The code snippet consists of two parts:
- A
<div>container - A
<script>tag that loads the Outbrain library asynchronously — so it won't affect your page load speed.
Before You Begin
Your Account Manager will provide the correct WIDGET_ID values for each placement. Do not use placeholder or example IDs.
Implementation Steps
-
Place the code snippet in the
<body>of your page, at the exact position where you want the widget to appear.- If you have multiple widgets, place each corresponding snippet in its respective position on the page.
-
Pass the page URL dynamically into the
data-srcvariable. This should be the URL of the page where the widget is loading.
Setting the data-src Value
- Use the page's canonical URL or og:url.
- Always use a live article URL.
⚠️ Important: Using a staging or development URL as the data-src value is one of the most common causes of content not appearing in the widget.
Comments
0 comments
Please sign in to leave a comment.