ai_cijo
AI Content Intent & Journey Orchestrator (AI-CIJO) helps site administrators
understand why visitors are on their site and
what stage of their journey they are in, then adapt
the site experience in a targeted, explainable, and privacy-safe way.
Unlike traditional analytics or hard-coded personalization rules,
AI-CIJO evaluates selected front-end page requests in real time and determines
visitor intent (such as browsing, comparing, or returning) and journey stage
(awareness, consideration, or retention).
Most importantly, AI-CIJO is not a black box.
Every decision is transparent and can be reviewed — or simulated for any URL —
by administrators through a built-in explainability tool.
What problem does this module solve?
Drupal sites often treat all visitors the same or rely on static rules such as
"if logged in, show X". These approaches lack context, flexibility, and insight
into why a visitor behaves a certain way.
AI-CIJO introduces a structured orchestration layer that allows site builders to:
- Understand visitor intent in real time
- Adapt site behavior predictably and transparently
- Control personalization without hard-coding logic
- Avoid collecting or storing personal data
How it works
- A visitor requests a front-end page
- AI-CIJO evaluates the request only if it matches configured targeting rules
- Anonymous contextual signals are collected, such as:
- Current page path
- Referrer
- User role (anonymous or authenticated)
- Language
- A pluggable intent detector determines visitor intent and journey stage
- An orchestration state is built, carrying the resolved intent, stage, and all matched actions
- Blocks, view filters, layout variant, and CTA are conditionally applied based on journey mappings
- The full orchestration outcome is stored per-user and made available to the explainability tool
Journey mappings
Journey mappings are configuration entities that connect a detected
intent + stage pair to a set of orchestration actions.
Each mapping can control:
- Blocks to hide — suppress specific block plugin IDs from rendering
- Blocks to force show — explicitly allow blocks regardless of other conditions
- View filters — inject field-level filters into any view using the format
view_id.field_name=value - Call to action — pass a CTA identifier to themes or custom render logic
- Layout variant — set a semantic variant name for theme-level layout decisions
Mappings are managed at /admin/config/ai-cijo/journey-mappings.
Block-level orchestration by design
AI-CIJO orchestrates site behavior at the block / rendered component level.
It does not manipulate Layout Builder sections or layout internals directly.
When blocks are hidden, layout sections collapse naturally. This approach ensures:
- Compatibility with Layout Builder and per-node layout overrides
- Cache-safe behavior using Drupal core rendering APIs
- Predictable results across themes and view modes
Targeted by design
AI-CIJO is disabled by default and evaluates only requests
explicitly allowed by administrators.
The module will never evaluate:
- Administrative pages
- Asset requests (CSS, JS, files)
- Internal Drupal rendering routes
- AJAX or non-HTML responses
Explainability
AI-CIJO includes an admin-only explainability tool at /admin/ai-cijo/explain
with two modes:
Live request inspection
After any qualifying front-end page is visited, the explain page shows:
- Detected intent and journey stage
- Confidence score
- Every signal used for the detection decision
- The full orchestration outcome: hidden blocks, shown blocks, injected view filters, layout variant, and resolved CTA
Simulate by URL
Administrators can enter any internal site path and simulate the full detection
and orchestration pipeline without triggering a real page render.
The simulation result includes a clear notice listing which live signals
(cookies, session, headers) were excluded, and the same outcome summary
as a live request.
JSON export
A JSON copy panel on the explain page lets administrators export the complete
detection payload for debugging, sharing with developers, or logging.
Privacy-first architecture
- No personal or sensitive user data is stored
- No cross-session tracking or profiling
- Explainability data is held in
tempstore.private— temporary, user-scoped, and never persisted long-term
Developer notes
- Pluggable
@IntentDetectorplugin system — extend detection without patching the module - Full dependency injection across all services, event subscribers, and form classes — no
\Drupal::static calls - Discovery cache backend registered for
IntentDetectorManager - Ships with unit, kernel, and functional test coverage
- All PHP files pass PHPCS Drupal standard with zero errors
Drupal compatibility
- Drupal 11 only
- PHP 8.3+
- Uses config entities, event subscribers, plugin system, and core hooks only
- No dependency on Layout Builder internals
- Clean install and uninstall —
hook_uninstall()removes all tempstore data