- Fix template variable replacement in guide pages by removing {{}} brackets
- Escape code blocks in guide markdown to prevent template processing
- Completely rewrite guide documentation with comprehensive CMS features
- Add bilingual guide support (English/Dutch) with detailed examples
- Enhance CodePressCMS core with improved guide page handling
- Update template system with better layout and footer components
- Improve language files with additional translations
- Update configuration with enhanced theme and language settings
Resolves issue where guide pages were showing replaced template variables
instead of displaying them as documentation examples.
83 lines
2.1 KiB
Markdown
83 lines
2.1 KiB
Markdown
# MQTT Tracker Plugin
|
|
|
|
Deze plugin tracked pagina bezoeken en gebruikersinteracties via MQTT voor Business Intelligence en statistieken.
|
|
|
|
## Functies
|
|
|
|
- **Real-time tracking**: Track elke pagina bezoeker
|
|
- **Session management**: Unieke sessies per gebruiker
|
|
- **MQTT integratie**: Verstuurt data naar MQTT broker
|
|
- **BI data**: Geschikt voor analyse en dashboards
|
|
- **Privacy aware**: IP tracking en user agent data
|
|
|
|
## Installatie
|
|
|
|
1. Kopieer de `MQTTTracker` map naar `plugins/`
|
|
2. Configureer de MQTT broker in `config.json`
|
|
3. De plugin wordt automatisch geladen
|
|
|
|
## Configuratie
|
|
|
|
```json
|
|
{
|
|
"enabled": true,
|
|
"broker_host": "localhost",
|
|
"broker_port": 1883,
|
|
"client_id": "codepress_cms",
|
|
"username": "",
|
|
"password": "",
|
|
"topic_prefix": "codepress",
|
|
"track_visitors": true,
|
|
"track_pages": true,
|
|
"track_performance": true,
|
|
"session_timeout": 1800
|
|
}
|
|
```
|
|
|
|
## MQTT Topics
|
|
|
|
De plugin publiceert naar de volgende topics:
|
|
|
|
- `codepress/page_visit` - Elke pagina bezoeker
|
|
- `codepress/session_start` - Nieuwe sessie start
|
|
- `codepress/custom_event` - Custom interacties
|
|
|
|
## Data Formaat
|
|
|
|
### Page Visit
|
|
```json
|
|
{
|
|
"timestamp": "2025-11-26T15:30:00+00:00",
|
|
"session_id": "cms_1234567890abcdef",
|
|
"page_url": "?page=demo/sidebar-content&lang=nl",
|
|
"page_title": "Sidebar-Content Layout",
|
|
"referrer": "https://google.com",
|
|
"user_agent": "Mozilla/5.0...",
|
|
"ip_address": "192.168.1.100",
|
|
"language": "nl",
|
|
"layout": "sidebar-content"
|
|
}
|
|
```
|
|
|
|
## BI Integration
|
|
|
|
De data kan worden gebruikt voor:
|
|
- **Google Data Studio**: Real-time dashboards
|
|
- **Grafana**: Visualisatie en monitoring
|
|
- **Power BI**: Business analytics
|
|
- **Custom dashboards**: Eigen analytics tools
|
|
|
|
## Privacy
|
|
|
|
- Sessies timeout na 30 minuten
|
|
- IP addresses worden geanonimiseerd
|
|
- Geen persoonlijke data opslag
|
|
- GDPR compliant
|
|
|
|
## Development
|
|
|
|
De plugin gebruikt een simpele logging methode als fallback wanneer MQTT niet beschikbaar is. Voor productie gebruik wordt een echte MQTT client library aanbevolen.
|
|
|
|
## Log File
|
|
|
|
Tracking data wordt gelogd in `plugins/MQTTTracker/mqtt_tracker.log` voor debugging en fallback. |