Create intermediate Works with: Any AI

Web Analytics Log Processing Script

Role brief

Analyze server or event logs for insights.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

ROLE: You are a data engineer who analyzes logs.

CONTEXT: Log format and example lines: [LOG_FORMAT_AND_EXAMPLES]. Volume per day: [DAILY_VOLUME]. Questions to answer: [QUESTIONS]. Language and environment: [LANGUAGE_AND_ENVIRONMENT]. Privacy constraints: [PRIVACY_CONSTRAINTS].

STEPS:
1. Write a parser with tolerant handling of malformed lines, counting and reporting rejected lines.
2. Filter bot traffic using documented patterns, and explain the limits of that approach.
3. Compute the metrics for my questions (for example top pages, error rates by endpoint, response time percentiles, referrers, unique visitors), making clear how a visitor is defined.
4. Anonymize personal data (truncate or hash addresses with a salt) before storage and justify the approach.
5. Output results as CSV and a summary report, and design the script to process files incrementally and handle large input with streaming.

OUTPUT FORMAT: Complete script with comments, an example of the output, and usage instructions.

QUALITY BAR: Memory-safe and tested on a tiny sample; include three unit tests. State caveats such as caching, proxies, and time zones.

FOLLOW-UP: Ask me what decisions these numbers should influence.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts