LogoLogo
WebsiteDocumentationChangelogStatusTerms
  • Getting Started
    • Overview
    • FAQs
    • Reference
      • Identifier Types
      • Identifier Profiles
      • Identity Clusters
      • Identity Resolution
      • Regular Expressions
      • Tabular Data Schema
      • Advanced Query Interface
      • IP Allowlisting
    • Global Data Regulations
  • Data
    • Sources
      • Amazon S3
      • API Source
      • Azure Blob Storage
      • BigQuery
      • Databricks
      • File Upload
      • Google Cloud Storage
      • Mailchimp
      • SDK Sources
        • Android SDK
        • iOS SDK
        • JavaScript SDK
      • SendGrid
      • Shopify
      • Snowflake
    • Data Configuration
      • Custom Identifiers
      • Traits
      • Events
      • Labels
  • Identity
    • EIDs Switchboard
  • Audiences
    • Audiences
      • Audience Builder
      • Insights
      • Activation
        • Real-Time Targeting
        • Google Ad Manager
        • Permutive
      • Exports
        • Metadata file
    • Destinations
      • Amazon DSP
      • Amazon S3
      • Azure Blob Storage
      • Campaign Manager 360
      • Display & Video 360
      • Google Ads
      • Google Cloud Storage (GCS)
      • Meta Ads
      • The Trade Desk
      • TikTok
      • Yahoo! Japan Ads
  • collaborate
    • Clean Rooms
      • Insights Clean Rooms
      • Activation Clean Rooms
      • Augmentation Clean Rooms
      • Prospecting Clean Rooms
    • Partnerships
      • Flash Partners
        • Optable Flash Node
        • AWS Connector
        • Snowflake Connector
      • Enterprise Partners
      • Flash Partner Settings
  • Differential Privacy
  • Admin
    • General
    • Accounts
      • Managing User Accounts
      • Roles
        • Permissions
      • Authentication
    • Real-Time API
    • Data Subject Requests
  • Profile Settings
    • Notifications
  • Guides
    • AWS Connector: Guides
      • Enterprise DCN
      • AWS Connector
    • Snowflake Connector: Guide
    • Optable CLI
    • Data Warehouse Exports
      • Google BigQuery
      • Snowflake
  • Announcements
    • Deprecation Notices
      • Q1 2025: Deprecation of Exports & Introduction of Syncs
      • Feb 21st, 2024: Removal of regex_allowed_http_origins
      • Dec 8th, 2022: Exports to Export Configurations
      • Deprecated uses in the CLI
Powered by GitBook
On this page

Was this helpful?

  1. Data
  2. Sources
  3. SDK Sources

JavaScript SDK

A lightweight JavaScript library to integrate your web sites with your DCN

Last updated 1 month ago

Was this helpful?

The JavaScript SDK makes it easy to integrate your sites with your DCN. It can be installed as a ES6 compatible module paired with module bundlers such as or , or can be loaded on a webpage directly, or using a tag management system, by referencing a release build from the page HTML via a <script> tag.

Details on installing and using the web SDK can be found in the . A demo of various SDK functionalities can be seen on .

Creating a Site (JavaScript SDK) Source

  1. Head to Data > Sources and click Create.

  2. Select the JavaScript SDK source.

  3. Enter the name of the source, this is how your source will be identified when you want to use it across the platform.

  4. You can then enter and override settings related to your SDK setup:

    • Slug: This has to be the same value as the value set in window.optable.site in your SDK instantiation.

    • Header Name: Override the default HTTP Request Header name if desired (cookie-based integration only)

    • Cookie Name: Override the default Optable cookie name if desired (cookie-based integration only)

    • Expiry: Override the default cookie expiration if desired (cookie-based integration only)

    • Allowed HTTP Origins: To prevent receiving data from unauthorized origins, you need to specify authorized domains, such as http://localhost, https://sub.domain.com. We also support a single wildcard to authorize a domain and all its subdomains such as https://*.mydomain.com.

  5. Click "Create"

Failing to authorize the proper "HTTP Origins" per source will result in CORS errors.

npm
webpack
browserify
Github README
demo.optable.co
An example of SDK source configuration