<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Learning Analytics Opt-In Consent</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; line-height: 1.6; color: #333; }
.container { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); padding: 40px; }
h1 { color: #1a73e8; font-size: 24px; margin-bottom: 10px; }
h2 { color: #202124; font-size: 20px; margin: 30px 0 15px; border-bottom: 2px solid #e8eaed; padding-bottom: 10px; }
p, li { font-size: 16px; margin-bottom: 12px; }
ul { padding-left: 20px; }
.highlight { background: #f1f3f4; padding: 15px; border-radius: 8px; border-left: 4px solid #1a73e8; }
.benefit { background: #e8f4fd; padding: 15px; border-radius: 8px; margin: 15px 0; }
.warning { background: #fff2cc; padding: 15px; border-radius: 8px; border-left: 4px solid #fbbc04; }
button { background: #1a73e8; color: white; border: none; padding: 14px 28px; font-size: 16px; border-radius: 8px; cursor: pointer; width: 100%; margin: 10px 0; transition: background 0.2s; }
button:hover { background: #1557b0; }
button.secondary { background: #f1f3f4; color: #3c4043; }
.progress { display: flex; gap: 10px; margin-bottom: 30px; }
.step { flex: 1; height: 4px; background: #e8eaed; border-radius: 2px; position: relative; }
.step.active { background: #1a73e8; }
.step::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; background: #1a73e8; border-radius: 50%; }
.step:last-child::after { display: none; }
.back-btn { background: none; color: #1a73e8; border: 1px solid #1a73e8; padding: 10px 20px; font-size: 14px; border-radius: 6px; cursor: pointer; margin-right: 10px; }
.hidden { display: none; }
@media (max-width: 480px) { .container { padding: 20px; } }
</style>
</head>
<body>
<div class="container">
<div class="progress" id="progress">
<div class="step active"></div>
<div class="step"></div>
<div class="step"></div>
<div class="step"></div>
</div>
<!-- Step 1: Introduction & Disclosures -->
<div id="step1">
<h1>Improve Your Learning with Analytics</h1>
<p>We're asking for your permission to use <strong>learning analytics</strong> to make your experience better. This is entirely optional—opt in only if you want personalized insights.</p>
<div class="highlight">
<h2>What Data Do We Collect?</h2>
<ul>
<li>Progress in courses (e.g., quiz scores, completion rates)</li>
<li>Interactions (e.g., time spent on activities, clicks, forum posts)</li>
<li>Demographics (e.g., age range, goals—if you provide them)</li>
<li>Device and session info (e.g., browser type, session duration)</li>
</ul>
<p><strong>We do NOT collect:</strong> Personal identifiers like name/email (unless explicitly shared), sensitive health data, or off-platform activity.</p>
</div>
<div class="warning">
<strong>Your data is anonymized</strong> where possible and stored securely with encryption. We comply with GDPR/CCPA and delete data after 2 years (or upon revocation).
</div>
<button onclick="nextStep(2)">Continue to Uses</button>
</div>
<!-- Step 2: Uses -->
<div id="step2" class="hidden">
<h1>How We Use Your Data</h1>
<div class="highlight">
<h2>Specific Purposes</h2>
<ul>
<li><strong>Personalization:</strong> Recommend courses, adaptive quizzes, and study plans based on your patterns.</li>
<li><strong>Insights:</strong> Provide dashboards showing your strengths, weaknesses, and progress trends.</li>
<li><strong>Improvements:</strong> Aggregate data to enhance platform features (e.g., better content sequencing).</li>
<li><strong>Research:</strong> Anonymized data for educational studies (published without identifying you).</li>
</ul>
</div>
<div class="benefit">
<h2>Benefits for You</h2>
<ul>
<li>Faster skill mastery through tailored recommendations</li>
<li>Clear progress reports to stay motivated</li>
<li>Platform-wide improvements from collective insights</li>
</ul>
</div>
<p><strong>Who has access?</strong> Only our analytics team and approved researchers. No third-party sharing without consent.</p>
<button class="back-btn" onclick="prevStep(1)">← Back</button>
<button onclick="nextStep(3)">Continue to Privacy & Revocation</button>
</div>
<!-- Step 3: Privacy & Revocation -->
<div id="step3" class="hidden">
<h1>Your Privacy & Control</h1>
<div class="highlight">
<h2>Privacy Protections</h2>
<ul>
<li>Data encrypted in transit and at rest</li>
<li>Access logs audited regularly</li>
<li>Right to access/export your data anytime</li>
</ul>
</div>
<div class="warning">
<h2>Revoke Anytime</h2>
<p>Change your mind? Easy:</p>
<ol>
<li>Go to <strong>Settings > Privacy > Learning Analytics</strong></li>
<li>Toggle off and confirm</li>
<li>Your data is <strong>immediately anonymized/deleted</strong> (within 30 days)</li>
</ol>
<p>No penalties—your account works fully without it.</p>
</div>
<button class="back-btn" onclick="prevStep(2)">← Back</button>
<button onclick="nextStep(4)">Opt In</button>
<button class="secondary" onclick="decline()">No Thanks (Opt Out)</button>
</div>
<!-- Step 4: Confirmation -->
<div id="step4" class="hidden">
<h1>Welcome to Enhanced Learning!</h1>
<p>Thanks for opting in. You'll see personalized insights soon.</p>
<div class="benefit">
<p><strong>Reminder:</strong> Revoke anytime in Settings > Privacy.</p>
</div>
<button onclick="complete()">Start Learning</button>
</div>
</div>
<script>
let currentStep = 1;
function nextStep(step) {
document.getElementById(`step${currentStep}`).classList.add('hidden');
document.querySelectorAll('.step')[currentStep-1].classList.remove('active');
currentStep = step;
document.getElementById(`step${currentStep}`).classList.remove('hidden');
document.querySelectorAll('.step')[currentStep-1].classList.add('active');
updateProgress();
}
function prevStep(step) {
document.getElementById(`step${currentStep}`).classList.add('hidden');
document.querySelectorAll('.step')[currentStep-1].classList.remove('active');
currentStep = step;
document.getElementById(`step${currentStep}`).classList.remove('hidden');
document.querySelectorAll('.step')[currentStep-1].classList.add('active');
updateProgress();
}
function updateProgress() {
document.querySelectorAll('.step').forEach((s, i) => {
s.classList.toggle('active', i < currentStep);
});
}
function decline() {
if (confirm('Are you sure? You can opt in later in Settings.')) {
alert('Opt-out saved. Happy learning!');
// Redirect or close modal
window.location.href = '/dashboard'; // Example
}
}
function complete() {
// Log consent: e.g., analyticsService.optIn()
alert('Consent logged. Redirecting...');
window.location.href = '/dashboard';
}
</script>
</body>
</html>
Implementation Notes
- Opt-In Flow: Multi-step modal/page for better UX (reduces overwhelm). Progress bar shows clarity.
- Disclosures: Step 1 details exact data collected/excluded, storage, and compliance.
- Uses: Step 2 lists granular purposes with user benefits.
- Revocation: Step 3 explains simple, penalty-free process with immediate effects.
- Best Practices:
- Granular, informed, freely given consent (GDPR-compliant).
- Mobile-responsive.
- No pre-checked boxes; explicit action required.
- Easy exit (back buttons, decline).
- Integration: Embed as modal (e.g., via React/Vue) or full page. Track consent in backend (e.g., user prefs DB). On revocation, trigger data purge job.
- Customization: Swap colors/content for your brand. Add A/B testing for conversion.
This is production-ready HTML—copy-paste to test! Let me know if you need variants (e.g., single-page, API hooks).