Widget Integration Guide


Widget Integration Guide

πŸ“Ž Integration Link: https://github.com/AdToken-2024/widget_integrationarrow-up-right


7.1 Quick Start

Add the following code snippet to your website’s HTML page where you want the AdToken widget to appear:

<script>
  window.process = { env: { NODE_ENV: "production" } };
  window.ADTOKEN_WIDGET_CONFIG = {
    containerId: "adtoken-widget", // Optional: Custom container ID
    apiKey: "YOUR_API_KEY", // Required: Get this from AdToken dashboard
    position: "bottom-mid" // Optional: Widget position (default: bottom-mid)
  };
</script>
<script type="module" src="https://www.widget.adtoken.co/ad-widget.js"></script>
<link rel="stylesheet" href="https://www.widget.adtoken.co/ad-widget.css" />

7.2 Configuration Options

Required Fields

  • apiKey: Your unique publisher API key (get this from your AdToken Dashboard β†’ My Websites section).


Optional Fields

Field
Description
Options
Default

position

Position of widget on page

bottom-left, bottom-mid, bottom-right, top-left, top-mid, top-right, mid-left, mid-mid, mid-right

bottom-mid

containerId

Custom container ID for advanced placements

Any valid ID name

adtoken-widget

adSize

Size of the widget

banner, leaderboard, medium_rectangle

banner


7.3 Example Integration


7.4 Notes:

  • Widget auto-loads ads: Once integrated, ads will automatically start displaying on approved websites.

  • Participation is automatic: After widget integration, publisher automatically participates in campaigns as per targeting and approval.

  • Manage & Track Performance: Go to Dashboard β†’ My Campaigns to view ongoing campaign stats and earnings.

Last updated