Email Reports
GiveWP’s Email Reports Add-on allows you to receive donation statistics for specific timespans directly in your inbox. Email Reports provides an easily digestible run down of your donation income and changes over time whereas per donation notifications can fill your inbox and cause distraction. The following will guide you through the setup, configuration, and customization of the plugin.
Add-on Install and Activation
To get started you will need to first have the GiveWP plugin installed and activated. Next, you should download and activate the Add-on following these steps:
- Download the Add-on – When you purchase Email Reports from the GiveWP website you will receive an email with a link to download your Add-on. If you don’t have the email you can always access your downloads from the My Account page on our site.
- How to Install and Activate the Add-on – Now that you have downloaded the plugin zip file it’s time to activate your plugin. The easiest way to do this is by logging into your WordPress website and navigating to Plugins > Add New > Upload Plugin and select the plugin file. This will upload the plugin, you should then activate it.
Note: You can always access your add-on purchase receipts, downloads, and licenses from your Account dashboard.
The Email Reports
Included within the plugin are three email reports that you may enable based on your requirements. Here is a screenshot of the daily and weekly email reports:
Email Reports Settings
The settings screen is located in your WP-Admin under Donations > Settings > Emails > Admin Emails. To enable each report you can click on the cross button in the left which then turns into a green tick.
Scheduling Reports
You can also enable/disable the daily/weekly/monthly reports by clicking on the gear icon on the right.
Once you have enabled the email reports, you will see the rest of the settings below.
Notification: Choose whether you want this email enabled or not.
Email Subject: Enter the email subject line.
Email Header: Enter the email header that appears at the top of the email.
Email Recipient: Enter the email address(es) that should receive a notification. You can add multiple recipients by clicking on the “Add Recipient” button.
Email Template: Choose your template from the available registered template types.
Email Delivery Time: Select the frequency ( day of the week, time etc ) that you would like to receive the email reports.
Preview Email: Click the “Preview Email” button to preview the email in your browser. Click the “Send Test Email” button to send a test email directly to your inbox.
If you wish to customize the emails, we have provided the give_email_reports_recipients
filter. This filter allows you to customize the email recipients using the following snippet:
/** * Customize the email report recipients. */ function my_custom_give_email_report_recipients($frequency){ $email_report_recipients = array( 'johnny@nonprofit.org', 'gene@nonprofit.org', 'pete@nonprofit.org' ); // This is an example of frequency based conditional email reports recipients. // if($frequency == 'daily') { // Emails specific to daily frequency here. // $email_report_recipients = array( 'javier@gmail.com' ); // } // Example of new emails for all frequencies: return $email_report_recipients; } add_filter('give_email_reports_recipients', 'my_custom_give_email_report_recipients', 10, 1);
To use this function first review How to Add Custom Functions to Your Site article and then customize the emails within the function’s array. You can use the commented conditional logic to send the various frequencies to different recipients.
Customizing the Reports
The various email reports (daily, weekly, monthly) are customizable and respect GiveWP’s email templating system which allows you to modify the content of each email.
How to Customize the Reports
To customize the content of each report you will need some basic development knowledge in order to copy and adjust the template files to suit your needs.
To override the default template copy the appropriate template file from give-email-reports/templates/emails/body-report-daily.php
to a new directory in your theme called my-theme/give/emails/body-report-daily.php
Now, any changes you make within the new template file are safe from being overwritten by plugin updates. You can add, remove, or make changes to the stats sent within the email in order to meet your requirements.