Paste the script once in Code Injection, then point any Squarespace button at the drawing — or add the ENTD button with a Code Block.
Open Code Injection (in site settings under developer tools, or search for “Code Injection” in the panel) and paste the script into the Header field. Save.
<script src="https://entd.tech/em/entd-embed.js"
data-connection-id="YOUR_CONNECTION_ID" async></script>Edit any Button block and set its link to #entd-draw-YOUR_DRAWING_ID. The button keeps your site’s style and opens the ENTD drawing.
Add a Code block, keep the mode on HTML, turn off Display Source and paste the container.
<div data-entd-drawing="YOUR_DRAWING_ID"></div>Scripts may not run while you’re editing. Exit the editor and open the live page.
data-entd-drawing gets the branded ENTD button inside it.data-entd-drawing to your own <a> or <button> — the drawing opens when it’s clicked, your design stays as is.#entd-draw-YOUR_DRAWING_ID. No HTML block needed — handy where you can only change a button’s URL.Add these attributes to the container to change the look of the ENTD button:
data-entd-theme — light, dark or autodata-entd-size — small, medium or largedata-entd-shape — rectangular or pilldata-entd-text — enter_draw, join_giveaway, participate, try_your_luck or any text of your owndata-entd-full-width="true", data-entd-logo="false"<div data-entd-drawing="YOUR_DRAWING_ID"
data-entd-theme="dark"
data-entd-shape="pill"
data-entd-text="Join the giveaway"></div>Most sites built with a website builder have no customer accounts. That’s fine: each visitor gets an anonymous ID stored in their browser, and entries are still checked for duplicates and bots before the draw. If your site does have accounts, pass the visitor’s ID so entries are tied to your customers:
<script>
// Optional: the ID of the logged-in visitor, if your site has accounts
window.ENTDEmbedConfig = { userId: 'CUSTOMER_ID' }
</script>#entd-draw-YOUR_DRAWING_ID with your Drawing ID.entd.tech in script-src and *.entd.tech in frame-src, and api.entd.tech in connect-src.