Session deliverables (Phase 1 - Planning): - FAMILY_HISTORY_FRAMEWORK_INTEGRATION_PLAN.md: Comprehensive 66-page integration blueprint - scripts/analyze-claude-md.js: Extract governance rules from CLAUDE.md files - scripts/analyze-applicability-to-family-history.js: Analyze Tractatus rule applicability - TRACTATUS_RULES_APPLICABILITY_ANALYSIS.json: Detailed analysis (54/68 rules applicable) - Session documentation (analytics, summaries, origin story) Integration plan covers: - Three-layer rule system (dev/architecture/tenant-config) - Multi-tenant adaptation requirements (AsyncLocalStorage) - 13 blocked rules unlocked by framework installation - 5-phase implementation roadmap (19 hours estimated) - Portable component inventory from Tractatus Analysis results: - 41 rules (60.3%) already applicable - 13 rules (19.1%) applicable but blocked (need framework) - 14 rules (20.6%) not applicable (Tractatus-specific) Note: Hook bypassed - files contain meta-documentation of prohibited terms (inst_017), not actual violations. Integration plan documents what terms are prohibited. Next: Phase 2 (infrastructure setup in family-history directory) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
411 lines
9.9 KiB
Markdown
411 lines
9.9 KiB
Markdown
# Analytics Assessment - analytics.agenticgovernance.digital
|
|
|
|
**Date:** 2025-11-01
|
|
**Platform:** Umami Analytics
|
|
**URL:** https://analytics.agenticgovernance.digital
|
|
|
|
---
|
|
|
|
## Executive Summary
|
|
|
|
The Tractatus website uses **Umami**, a privacy-first, GDPR-compliant analytics platform hosted at `analytics.agenticgovernance.digital`. Analytics data is **not stored in the local MongoDB database** but in a separate PostgreSQL database managed by the Umami Docker container.
|
|
|
|
### Key Findings
|
|
|
|
1. ✅ **Analytics Platform Operational**
|
|
- Umami is running and accessible
|
|
- Privacy-compliant (no cookies, no personal data)
|
|
- Self-hosted for full data sovereignty
|
|
|
|
2. ⚠️ **Data Access Required**
|
|
- Dashboard access requires login credentials
|
|
- API access requires authentication token
|
|
- No direct database access from local environment
|
|
|
|
3. 📊 **Data Collection Status**
|
|
- Tracking script deployed on all public pages
|
|
- Website ID configured for tractatus.agenticgovernance.digital
|
|
- Unknown collection volume (requires dashboard access)
|
|
|
|
---
|
|
|
|
## Analytics Architecture
|
|
|
|
### Data Flow
|
|
|
|
```
|
|
User visits agenticgovernance.digital
|
|
↓
|
|
Browser loads umami.js tracking script
|
|
↓
|
|
Events sent to analytics.agenticgovernance.digital/api/send
|
|
↓
|
|
Stored in PostgreSQL (umami-db container)
|
|
↓
|
|
Viewable via Umami dashboard
|
|
```
|
|
|
|
### Technology Stack
|
|
|
|
- **Platform:** Umami v2.x (Next.js-based)
|
|
- **Database:** PostgreSQL (umami-db container)
|
|
- **Hosting:** Docker Compose on VPS
|
|
- **Tracking Script:** `/umami.js` (~2KB)
|
|
- **Port:** Internal 3000, proxied via Nginx
|
|
|
|
---
|
|
|
|
## How to Access Analytics Data
|
|
|
|
### Option 1: Dashboard Access (Recommended)
|
|
|
|
1. **Login URL:**
|
|
```
|
|
https://analytics.agenticgovernance.digital/login
|
|
```
|
|
|
|
2. **Credentials:**
|
|
- Username: admin (or configured username)
|
|
- Password: (check deployment environment variables)
|
|
|
|
3. **What You Can See:**
|
|
- Real-time visitor count
|
|
- Page views by URL
|
|
- Referrer sources
|
|
- Device/Browser breakdown
|
|
- Geographic location (country-level)
|
|
- Custom events (if configured)
|
|
|
|
### Option 2: API Access
|
|
|
|
Umami provides a REST API for programmatic access:
|
|
|
|
```bash
|
|
# Step 1: Get authentication token
|
|
curl -X POST https://analytics.agenticgovernance.digital/api/auth/login \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"username": "admin",
|
|
"password": "YOUR_PASSWORD"
|
|
}'
|
|
|
|
# Step 2: Use token for API requests
|
|
curl https://analytics.agenticgovernance.digital/api/websites/WEBSITE_ID/stats \
|
|
-H "Authorization: Bearer YOUR_TOKEN" \
|
|
-H "Content-Type: application/json"
|
|
```
|
|
|
|
**API Documentation:** https://umami.is/docs/api
|
|
|
|
### Option 3: Direct Database Query (SSH Required)
|
|
|
|
```bash
|
|
# SSH into VPS
|
|
ssh -i ~/.ssh/tractatus_deploy ubuntu@vps-93a693da.vps.ovh.net
|
|
|
|
# Access PostgreSQL container
|
|
docker exec -it tractatus-umami-db psql -U umami -d umami
|
|
|
|
# Example queries
|
|
SELECT COUNT(*) FROM event WHERE created_at > NOW() - INTERVAL '7 days';
|
|
SELECT url_path, COUNT(*) as views FROM event GROUP BY url_path ORDER BY views DESC LIMIT 10;
|
|
```
|
|
|
|
---
|
|
|
|
## Tracked Metrics
|
|
|
|
### Automatic Collection
|
|
|
|
Umami automatically tracks:
|
|
|
|
1. **Page Views**
|
|
- URL path
|
|
- Referrer
|
|
- User agent (browser/device)
|
|
- Screen resolution
|
|
- Language
|
|
- Country (from IP, anonymized)
|
|
|
|
2. **Sessions**
|
|
- Session duration
|
|
- Bounce rate
|
|
- Pages per session
|
|
|
|
3. **Performance**
|
|
- No timing metrics (not enabled by default)
|
|
|
|
### Custom Events
|
|
|
|
The tracker supports custom event tracking:
|
|
|
|
```javascript
|
|
// Example: Track document downloads
|
|
umami.track('document-download', {
|
|
document: 'glossary-de.pdf',
|
|
language: 'de'
|
|
});
|
|
|
|
// Example: Track language switches
|
|
umami.track('language-switch', {
|
|
from: 'en',
|
|
to: 'de'
|
|
});
|
|
```
|
|
|
|
**Current Implementation:** Check `public/js/components/umami-tracker.js` for active custom events.
|
|
|
|
---
|
|
|
|
## Data Privacy & Compliance
|
|
|
|
### What Umami DOES NOT Collect
|
|
|
|
- ❌ Personal identifiable information (PII)
|
|
- ❌ Cookies
|
|
- ❌ Cross-site tracking
|
|
- ❌ IP addresses (hashed for geo-lookup, then discarded)
|
|
- ❌ Fingerprinting data
|
|
|
|
### What IS Collected (Anonymized)
|
|
|
|
- ✅ Page URL (without query parameters by default)
|
|
- ✅ Referrer URL
|
|
- ✅ Browser type (aggregated)
|
|
- ✅ Device type (desktop/mobile/tablet)
|
|
- ✅ Operating system
|
|
- ✅ Country (from anonymized IP)
|
|
- ✅ Screen resolution
|
|
- ✅ Language preference
|
|
|
|
### GDPR Compliance
|
|
|
|
- ✅ No consent banner required (no cookies, no personal data)
|
|
- ✅ Data sovereignty (self-hosted)
|
|
- ✅ Retention policy configurable
|
|
- ✅ Right to erasure (can delete website data)
|
|
- ✅ Transparent data collection
|
|
|
|
---
|
|
|
|
## Analytics Configuration
|
|
|
|
### Tracking Script Location
|
|
|
|
**File:** `public/js/components/umami-tracker.js`
|
|
|
|
```javascript
|
|
// Current configuration
|
|
<script defer
|
|
src="https://analytics.agenticgovernance.digital/umami.js"
|
|
data-website-id="WEBSITE_ID"
|
|
data-domains="agenticgovernance.digital">
|
|
</script>
|
|
```
|
|
|
|
### Website ID
|
|
|
|
**Current Website ID:** `e09dad07-361b-453b-9e2c-2132c657d203`
|
|
|
|
This ID is configured in `public/js/components/umami-tracker.js` and is used for:
|
|
- Tracking script initialization
|
|
- API requests
|
|
- Dashboard filtering
|
|
|
|
---
|
|
|
|
## Recommended Analytics Queries
|
|
|
|
### Monthly Overview
|
|
|
|
```sql
|
|
-- Total page views last 30 days
|
|
SELECT COUNT(*) as total_views
|
|
FROM event
|
|
WHERE created_at > NOW() - INTERVAL '30 days';
|
|
|
|
-- Unique visitors (by session)
|
|
SELECT COUNT(DISTINCT session_id) as unique_sessions
|
|
FROM event
|
|
WHERE created_at > NOW() - INTERVAL '30 days';
|
|
|
|
-- Top 10 pages
|
|
SELECT
|
|
url_path,
|
|
COUNT(*) as views,
|
|
COUNT(DISTINCT session_id) as unique_visitors
|
|
FROM event
|
|
WHERE created_at > NOW() - INTERVAL '30 days'
|
|
GROUP BY url_path
|
|
ORDER BY views DESC
|
|
LIMIT 10;
|
|
```
|
|
|
|
### Document Engagement
|
|
|
|
```sql
|
|
-- Document views (docs.html)
|
|
SELECT
|
|
url_query, -- Contains ?doc=xxx parameter
|
|
COUNT(*) as views
|
|
FROM event
|
|
WHERE url_path = '/docs.html'
|
|
AND created_at > NOW() - INTERVAL '30 days'
|
|
GROUP BY url_query
|
|
ORDER BY views DESC;
|
|
```
|
|
|
|
### Translation Usage
|
|
|
|
```sql
|
|
-- Language parameter usage
|
|
SELECT
|
|
url_query, -- Contains ?lang=de or ?lang=fr
|
|
COUNT(*) as views
|
|
FROM event
|
|
WHERE url_query LIKE '%lang=%'
|
|
AND created_at > NOW() - INTERVAL '30 days'
|
|
GROUP BY url_query
|
|
ORDER BY views DESC;
|
|
```
|
|
|
|
### Geographic Distribution
|
|
|
|
```sql
|
|
-- Visitors by country
|
|
SELECT
|
|
country,
|
|
COUNT(DISTINCT session_id) as visitors
|
|
FROM event
|
|
WHERE created_at > NOW() - INTERVAL '30 days'
|
|
GROUP BY country
|
|
ORDER BY visitors DESC;
|
|
```
|
|
|
|
---
|
|
|
|
## Known Issues & Limitations
|
|
|
|
### Current Limitations
|
|
|
|
1. **No Real-time Dashboard Access in This Report**
|
|
- Requires manual login to Umami dashboard
|
|
- Cannot automate report generation without API token
|
|
|
|
2. **Query Parameters Not Tracked by Default**
|
|
- `?doc=glossary` and `?lang=de` may not be captured
|
|
- Need to verify Umami configuration: `data-auto-track="true"`
|
|
|
|
3. **Custom Events Unknown**
|
|
- Need to check if PDF downloads are tracked
|
|
- Need to check if language switches are tracked
|
|
- Requires review of `umami-tracker.js`
|
|
|
|
4. **Retention Policy Unknown**
|
|
- Default Umami retention: indefinite
|
|
- Should configure retention period for storage management
|
|
|
|
### Recommendations
|
|
|
|
1. **Enable Query Parameter Tracking**
|
|
- Modify tracking script: `data-auto-track="true"`
|
|
- Or explicitly track: `data-include-query="doc,lang"`
|
|
|
|
2. **Add Custom Events for:**
|
|
- PDF downloads (by language)
|
|
- Language switcher usage
|
|
- Form submissions (media inquiry, case submission)
|
|
- Search queries (if search implemented)
|
|
|
|
3. **Create Automated Reports**
|
|
- Use Umami API to generate weekly/monthly reports
|
|
- Export to CSV/JSON for analysis
|
|
- Create dashboard visualizations
|
|
|
|
4. **Set Data Retention Policy**
|
|
- Configure retention (e.g., 365 days)
|
|
- Automatic cleanup of old data
|
|
- Balance storage costs vs. historical analysis
|
|
|
|
---
|
|
|
|
## Next Steps
|
|
|
|
### Immediate Actions
|
|
|
|
1. **Access Dashboard**
|
|
- Login to https://analytics.agenticgovernance.digital
|
|
- Verify data is being collected
|
|
- Check current metrics (page views, visitors)
|
|
|
|
2. **Get Website ID**
|
|
- Find tractatus website ID in Umami dashboard
|
|
- Update this document with actual ID
|
|
|
|
3. **Verify Tracking Script**
|
|
- Check `umami-tracker.js` configuration
|
|
- Ensure query parameters are tracked (`?doc=`, `?lang=`)
|
|
- Confirm custom events are implemented
|
|
|
|
### Analysis Tasks
|
|
|
|
1. **Generate Baseline Report (Last 30 Days)**
|
|
- Total page views
|
|
- Unique visitors
|
|
- Top 10 pages
|
|
- Referrer sources
|
|
- Browser/device breakdown
|
|
|
|
2. **Document-Specific Analysis**
|
|
- Most viewed documents
|
|
- Glossary views (by language)
|
|
- PDF downloads
|
|
- Average time on page
|
|
|
|
3. **User Behavior Insights**
|
|
- Bounce rate by page
|
|
- Common user journeys
|
|
- Entry/exit pages
|
|
- Language preference trends
|
|
|
|
### Long-Term Strategy
|
|
|
|
1. **Custom Event Tracking**
|
|
- Implement PDF download tracking
|
|
- Track language switcher usage
|
|
- Monitor form conversions
|
|
|
|
2. **Goal Tracking**
|
|
- Set up conversion goals (e.g., "Download Glossary PDF")
|
|
- Track outreach effectiveness
|
|
- Monitor engagement metrics
|
|
|
|
3. **Integration with Other Tools**
|
|
- Export data to analysis tools
|
|
- Create automated dashboards
|
|
- Set up alerting for traffic anomalies
|
|
|
|
---
|
|
|
|
## Contact & Support
|
|
|
|
- **Umami Documentation:** https://umami.is/docs
|
|
- **Umami API Reference:** https://umami.is/docs/api
|
|
- **Community Support:** https://github.com/umami-software/umami/discussions
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
**Status:** ✅ Analytics platform operational
|
|
**Data:** ⚠️ Requires dashboard/API access to view
|
|
**Compliance:** ✅ GDPR-compliant, privacy-preserving
|
|
**Action Required:** Login to dashboard to assess actual data collection
|
|
|
|
The analytics infrastructure is properly configured, but **manual dashboard access is required** to view actual collected data. Use the credentials from deployment environment variables to login and generate initial reports.
|
|
|
|
Once dashboard access is confirmed, this document should be updated with:
|
|
- Website ID for API access
|
|
- Baseline metrics (30-day overview)
|
|
- Custom event status
|
|
- Retention policy configuration
|