Skip to content

Add audit logging for analytics export actions #554

Description

@phertyameen

Description

Persist a row to AnalyticsExportLog every time GET /analytics/export is called, capturing who exported what data and for which date range.

Why this matters

Data exports are the highest-risk analytics feature from a privacy standpoint and should be auditable after the fact.

Files to touch

  • backend/src/analytics/providers/export-csv.provider.ts
  • backend/src/analytics/entities/analytics-export-log.entity.ts

Acceptance Criteria

  • Every successful export creates exactly one audit row
  • Failed export attempts are also logged with a failure reason

Notes

This issue is part of the new analytics module effort (tracking, aggregation,
and reporting on player/game activity). Please keep new code inside
backend/src/analytics/ following the same module/controller/service/provider
layout used by existing modules (e.g. progress, streak, quests).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions