=== Spectare Personalisation ===
Contributors: spectare
Tags: personalisation, personalization, ai, dynamic content, marketing
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-driven personalisation for WordPress. Spectare assembles a different page experience for every visitor based on referrer and UTM signals.

== Description ==

Spectare reads where each visitor came from (referrer, UTM parameters, page context) and silently assembles a personalised version of your page from a library of content blocks called atoms. No surveys, no cookies, no asking visitors who they are.

You write your content once as atoms: a pricing block, a feature explanation, a case study, a FAQ. Spectare picks the right 3 to 5 atoms for each visitor and slots them into your page in milliseconds.

**How it works**

1. A visitor arrives on your site. Spectare reads their referrer URL, UTM parameters, and page content.
2. An AI classifies their likely audience (developer, executive, manager) and buyer stage (awareness, consideration, decision).
3. Spectare selects the most relevant atoms from your library and assembles them into named slots on the page.
4. The assembled content is cached so repeat visitors are served instantly.

**What this plugin does**

* Injects the Spectare widget script onto every page (optional, can be disabled)
* Provides a Gutenberg block (Spectare Slot) for placing personalised content zones in the block editor
* Provides a shortcode for classic editor and text widgets
* Adds a settings page under Settings → Spectare for entering your organisation slug and base URL

**Slot placement**

Slots are named placeholders. Spectare fills each one with the most appropriate atom for that visitor. Slot names map to positions in your assembled layout:

* `primary` — the main content area, highest priority atom
* `supporting` — secondary content, one or more blocks
* `secondary` — lowest priority, often a FAQ or comparison

Use the Spectare Slot block in Gutenberg or the shortcode in the classic editor:

`[spectare_slot name="primary"]`
`[spectare_slot name="supporting"]`
`[spectare_slot name="secondary"]`

You can reserve vertical space to prevent layout shift while content loads:

`[spectare_slot name="primary" height="200"]`

**Requirements**

A Spectare account is required. Sign up at [spectare.ai](https://spectare.ai). Spectare is free to start with 1,000 personalised visitors per month.

== Installation ==

1. Download the plugin zip from your Spectare admin under Settings, or from the WordPress plugin directory.
2. In your WordPress dashboard, go to Plugins → Add New → Upload Plugin and upload the zip file.
3. Click Install Now, then Activate Plugin.
4. Go to Settings → Spectare and enter your organisation slug (found in your Spectare admin under Settings).
5. Add a Spectare Slot block in the Gutenberg editor, or add the `[spectare_slot]` shortcode wherever you want personalised content to appear.

That is all. Spectare handles everything else automatically.

== Frequently Asked Questions ==

= Do I need to write code? =

No. The plugin handles script injection and slot rendering. You write your content atoms in the Spectare admin and the plugin takes care of the rest.

= What is an atom? =

An atom is one focused piece of content: a feature explanation, a pricing block, a FAQ, a case study. You write atoms in the Spectare admin. Spectare assembles the right combination for each visitor.

= How many atoms should I write? =

Ten is enough to see meaningful personalisation. The recommended starting set covers your core feature, your main differentiator, pricing, a common objection, a competitor comparison, a developer how-to, a customer outcome, a pricing FAQ, your data handling stance, and your integration story.

= Does Spectare use cookies or track personal data? =

No cookies are set and no personal data is collected. Spectare reads only the HTTP referrer header, UTM parameters already present in the URL, and the text content of the current page. Nothing is stored on the visitor's device.

= Can I use Spectare with a page builder? =

Yes. Any builder that supports shortcodes (Elementor, Divi, WPBakery, Beaver Builder) can use `[spectare_slot]`. The Gutenberg block works natively in the block editor.

= What if I want to load the script manually? =

Disable auto-inject in Settings → Spectare → Auto-inject widget. Then add the script tag yourself:

`<script src="https://spectare.ai/spectare.js" data-org="your-slug" async></script>`

= Does this slow down my site? =

The Spectare script loads asynchronously and does not block page rendering. Personalised content fills slots after the page is visible. Cached assemblies (repeat visitors with the same intent profile) are served in under 100ms.

= What WordPress versions are supported? =

WordPress 5.8 and above. The Gutenberg block requires the block editor introduced in WordPress 5.0, but the shortcode works in any editor version.

== Screenshots ==

1. The Spectare Slot block in the Gutenberg editor, showing the dashed placeholder with the selected slot name.
2. The settings page: enter your organisation slug and configure auto-inject.
3. A page assembled by Spectare showing personalised content in three slots, side by side with the default view.

== Changelog ==

= 1.0.0 =
* Initial release.
* Auto-inject of Spectare widget script via wp_enqueue_scripts.
* Gutenberg block (Spectare Slot) with slot selector, custom name, and reserved height options.
* Shortcode [spectare_slot] with name and height attributes.
* Settings page with organisation slug, base URL, and auto-inject toggle.
