🛡️
PrivacyID
  • Introduction
  • User Interface Guide
  • Integration Guide
    • Implementing the API endpoint
    • Configuring the DNS entry
    • Installing the embed snippet
    • Using PrivacyID with third-party clients
    • Architecture
  • JavaScript API
  • Frequently Asked Questions
Powered by GitBook
On this page

Was this helpful?

  1. Integration Guide

Installing the embed snippet

PreviousConfiguring the DNS entryNextUsing PrivacyID with third-party clients

Last updated 1 year ago

Was this helpful?

This snippet must appear at the top of every page on your site where you need to interact with the PrivacyID JavaScript API.

Place the snippet code so that it appears immediately after the <head> tag on each page of your site.

Be sure to replace the following placeholders in the snippet:

  • PROXY_DOMAIN - This is the subdomain you configured using DNS records to point to the PrivacyID servers. For example, if your website is at and you created the subdomain , then use pid.your-website.com for this value.

  • PATH_TO_API_ENDPOINT - This is the path to the API endpoint you implemented on your web server. For example, this may be "/api/privacyId".

<!-- PrivacyID start -->
<script type="text/javascript">
(function(){function fn(){fn._i.push(arguments);}fn._i=[];window.PrivacyID=window.PrivacyID||fn;}());

PrivacyID('endpoint', 'PATH_TO_API_ENDPOINT');
</script>
<script async src="https://PROXY_DOMAIN/library.js"></script>
<!-- PrivacyID end -->
https://your-website.com
pid.your-website.com