The Custom Embeds API allows you to embed custom HTML and JavaScript code into specific positions on Wix site pages. This enables you to add custom functionality to enhance your site's capabilities.
With the Custom Embeds API, you can:
Create custom embeds with HTML and JavaScript code.
Position embeds in the page head or body tags.
Enable or disable embeds without deleting them.
Monitor embed changes through domain events.
Embeds are classified into categories that determine their loading behavior:
ESSENTIAL
FUNCTIONAL
ANALYTICS
ADVERTISING
DATA TO THIRD PARTY
Custom embeds can be placed in 3 strategic locations:
HEAD
: In the document's <head>
section.
BODY_START
: At the beginning of the <body>
section.
BODY_END
: At the end of the <body>
section.
It's important to note the following points before starting to code:
HEAD
, BODY_START
, or BODY_END
) that determines when and where the code is executed.enabled
= true
.category
property that determines how and when the embed is rendered based on user consent and site policies.