Embed your legal documents

Legal Monster helps you to manage and update your legal documents. Our document feature lets you display your important documents when users will understand them best, at the time they give consent.

Legal.js is currently in beta.

Show a document

The document feature requires both a <div> tag and a JavaScript snippet to work. Place the <div> tag where you intend to show the document on your site.

The <div>tag must have a unique ID attribute name, such as document-target shown below:

<div id="document-target"></div>

To render and show the document to the user you must also include legal.document(). Immediately after you make a call to legal.document() it will start to track the audit trail to make sure that the user has seen and read the document. If you give your <div> a different ID, use that instead of document-target in the example below:

legal.document("document-target", "<<DOCUMENT PUBLIC KEY>>");

Replace <<PROJECT PUBLIC KEY>> with the actual key of the document you wish to show.

Insertion mode

You can use theinsertMode option to change how and where the widget is placed in relation to the target element:

legal.document("document-target", "<<DOCUMENT PUBLIC KEY>>", {
insertMode: "append",

You can change the insertion method to one of the following options:

Insertion mode


replace (Default)

Replaces the specified target element with the widget


Inserts the widget after the specified target element


Inserts the widget before the spceified target element