Email Reports
Send scheduled analytics summaries (with optional PDF report) to your team and clients.
Insights can send a recurring analytics report to a list of email recipients. This is a simple way to keep clients, marketing teams, or other stakeholders up to date.
The email contains an HTML summary with the most important KPIs, top pages, and top referrers for the period. You can also attach the full dashboard PDF, so recipients get a complete report directly in their inbox.
Email delivery uses Craft's configured mailer (the same one used for password resets and other system mails).
Configuration
Open Settings → Insights → Notifications in the control panel:
You can also set all of these in config/insights.php — see Configuration → emailFrequency / emailRecipients / attachPdfReport / useCronForEmails.
How Scheduling Works
Insights does not need a cron job. On normal site requests, the plugin checks if a report is due. This check is cached, so it runs at most once per hour, no matter how much traffic you get. When enough time has passed since the last sent report, a SendNotificationReport job is pushed to the queue.
Duplicate Protection
Two safeguards prevent duplicate reports:
- Only one report job can be in the queue at a time. While a job is waiting, the hourly check does not add another one.
- Before sending, the job checks again that the report is still due and that the frequency setting has not changed. Old or duplicate jobs — for example after the queue was stopped for a while — skip themselves and send nothing. Setting the frequency to
Neveralso cancels jobs that are already in the queue.
The stats range always covers the time since the previous send. Each report describes the period between two emails, with no gaps and no overlaps.
Audit Log
Every send (and every failure) is stored in the insights_notification_log database table, together with the frequency, recipient count, status, and any error message. The status shows the job lifecycle: queued (job is waiting), sent, failed, or skipped (a duplicate or outdated job that did not send). The timestamp of the last successful send decides when the next report is due. So even if your site gets no traffic for a while, no duplicate emails go out when it comes back.
The regular data cleanup removes log entries older than dataRetentionDays.
Send Test Mail
Below the recipients table there is a Send Test Mail button. It sends the report to your own address. Save your settings first, then send the test mail.
Console Command
You can also send a report from the command line:
# Send the report for the configured frequency, but only if it is due
php craft insights/notifications/send
# Send now, even if the report is not due yet
php craft insights/notifications/send --force
# Send a specific frequency variant on demand
php craft insights/notifications/send --frequency=monthly --force
Available --frequency values: weekly, biweekly, monthly.
If you want reports to always go out at a fixed time, enable Send Reports via Cron Only (useCronForEmails). This turns off the automatic check. Reports are then only sent by a scheduled command:
# Runs daily at 8:00. The due-check makes sure the report
# is still only sent once per configured interval.
0 8 * * * php /path/to/craft insights/notifications/send
PDF Attachment
When Attach Report PDF is enabled, every email (including test mails) includes a PDF that matches the manual dashboard PDF export:
- Period header with the exact date range
- Summary KPIs (Pageviews, Unique Visitors, Avg. Time / Page, Bounce Rate)
- Traffic chart (pageviews + unique visitors per day)
- Top Pages, Traffic Sources, Devices, Browsers
- Pro tables when available (Top Countries, Campaigns, Events, Outbound Links, Searches, Entry/Exit Pages, Scroll Depth)
The PDF is generated with dompdf at send time. If the PDF rendering fails, a warning is logged and the HTML email is still sent without the attachment.