Atoms / Library

featureintegrationscript-tagdata-spectare-targetdom

Drop Spectare into any existing page without adding wrapper elements

data-spectare-target

New attribute

title, content, cta

Supported fields

0 wrapper elements

Additional markup required

Spectare now fills your existing HTML elements directly. Add a data-spectare-target attribute to any heading, paragraph, or anchor you already have on the page and the script tag will inject the right personalised content at load time. There is no need to add wrapper divs or restructure your markup.

The attribute value is written as slot:field. The slot name matches a slot you have configured in your Spectare workspace. The field controls what gets injected: title replaces the element's text content, content sets its innerHTML, and cta sets the link text and href on anchor elements. A single script tag in your page head is the only other requirement.

This works on any HTML page regardless of the framework or CMS behind it. WordPress, plain HTML, Webflow, and any server-rendered stack all work the same way. You style the element however you like and Spectare fills in the words, leaving your design system completely untouched.

Relative URLs are fully supported in cta fields, so internal links like /signup or /pricing work alongside absolute destinations without any extra configuration.

This is one atom from the Spectare content library. Spectare assembles the right atoms for each visitor in real time, based on who they are and how they arrived.