Creating Another Stylish Client Report in MainWP

by

Over the past year, I have been sending stylized monthly reports to my clients. They’ve appreciated this regular reminder showing the benefits of having invested in a care plan for their website. As we near the end of another year, I would like to offer them a year-end review of the activity associated with their website. And I would like to offer you this template I have crafted for use with the MainWP Client Reports extension. For those of you just wanting to make quick use of it, here’s the code.

<table style="width: 700px; margin: 0 auto; padding: 0; border-spacing: 0; border-collapse: collapse; background-image: linear-gradient( to left, rgb(215, 215, 215), rgb(231, 211, 186) 300% ); font-size: 14px; color: #3F3F3F"><tbody><tr><td colspan="2" style="background: #040404; margin-top: 0; padding: 0;"><img style="display: block; border: 0; line-height: 1;" alt="Typewheel" src="https://typewheel.xyz/share/typewheel-email-pencil.png" width="700"></td></tr><tr><td colspan="2" style="padding: 2.5em;"><p style="margin-top: 0;">Hello and happy new year, [client.contact.nickname]! Here's a final overview of your website's activity during this past year. Thank you again for trusting your website to Typewheel! I look forward to our continued partnership throughout the coming year.</p><p style="margin-bottom: 0;">Peace in the New Year,<br />Joshua Vandercar</p></td></tr><tr><td style="width: 25%; padding: 0 2em 1em 2.5em;"><img style="display: block; width: 100%; height: auto;" src="[client.logo.url]" alt="[client.name] Logo" height="100"></td><td style="width: 75%; padding: 0 2.5em 0 0;" valign="top"><p style="margin: 0;"><span style="font-size: 200%; font-weight: bold;">[client.name]</span><br /><span style="font-size: 125%; font-weight: bold; font-style: italic;"><a style="color: #3F3F3F; text-decoration: none;" href="[client.site.url]">[client.site.domain]</a></span><br /><span style="font-size: 110%; margin-top: .75em; display: block;">[report.daterange]</span></p></td><tr><td colspan="2"><table style="width: 100%; border-collapse: separate; border-spacing: 2.5em;"><tbody><tr><td colspan="4" style="width: 33%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[ga.visits]</span><br /><span style="font-size: 100%;">Site Visitors</span></td><td colspan="4" style="width: 33%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[ga.new.visits]</span><br /><span style="font-size: 100%;">New Visits</span></td><td colspan="4" style="width: 33%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[ga.pageviews]</span><br /><span style="font-size: 100%;">Page Views</span></td></tr><tr><td colspan="6" style="width: 50%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[post.created.count]</span><br /><span style="font-size: 100%;">Posts Created</span></td><td colspan="6" style="width: 50%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[comment.created.count]</span><br /><span style="font-size: 100%;">Comments Posted</span></td></tr><tr><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[wordpress.updated.count]</span><br /><span style="font-size: 100%;">WP Updates</span></td><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[theme.updated.count]</span><br /><span style="font-size: 100%;">Theme Updates</span></td><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[plugin.updated.count]</span><br /><span style="font-size: 100%;">Plugin Updates</span></td><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[backup.created.count]</span><br /><span style="font-size: 100%;">Backups</span></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding: 1.5em 2.5em 0;"><span style="font-size: 135%; font-weight: bold;">Full Activity Report</span></td></tr><tr><td colspan="2" style="padding: 1em 2.5em;"><table style="width: 100%;"><tbody><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Posts Created ([post.created.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.posts.created][post.title] by [post.created.author] on [post.created.date][/section.posts.created]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Users Created ([user.created.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.users.created][user.name] on [user.created.date] as [user.created.role] by [user.created.author][/section.users.created]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Users Deleted ([user.deleted.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.users.deleted][user.name] on [user.deleted.date] by [user.deleted.author][/section.users.deleted]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">WordPress Updates ([wordpress.updated.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.wordpress.updated]WordPress • [wordpress.old.version] to [wordpress.current.version] by [wordpress.updated.author] on [wordpress.updated.date][/section.wordpress.updated]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Theme Updates ([themes.updated.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.themes.updated][theme.name] • [theme.old.version] to [theme.current.version] by [theme.updated.author] on [theme.updated.date][/section.themes.updated]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Plugin Updates ([plugins.updated.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.plugins.updated][plugin.name] • [plugin.old.version] to [plugin.current.version] by [plugin.updated.author] on [plugin.updated.date][/section.plugins.updated]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0; font-size: 80%;" valign="top"><span style="font-size: 120%; font-weight: bold;">Uptime Stats ([aum.alltimeuptimeratio] – <em>all time</em>)</span><br /><p style="margin: .5em .5em 1em;">[aum.stats]</p></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding: 1.5em; text-align: center; font-size: 80%; background: #3F3F3F; color: #d7d7d7;"><p><a style="color: #d7d7d7;" href="https://typewheel.xyz/">Typewheel</a> • 7118 Bohnke Dr, Fort Wayne, IN 46815 • <a style="color: #d7d7d7;" href="mailto:joshua@typewheel.xyz">joshua@typewheel.xyz</a><br />Prefer not to receive these reports? Let me know and I will disable them.</p></td></tr></tbody></table>

Note: This template uses custom tokens for each site.

Note: If using this template for a year-end report, the child report settings on your child sites should have Keep Records for set to a minimum of ~400 days (it currently defaults to 180 days).

Note: Necessary plugins need to have been installed and functional during the past year in order to provide an accurate year-end report.

Update: I’ve begun collecting this and other templates here.

Before You Begin

In order to properly run this specific template in your dashboard, you’ll need the following plugins installed and have had them functional during the past year in order to provide an accurate report.

Plugins Installed on MainWP Dashboard

Plugins Installed on Child Site(s)

The smarter way to manage your WordPress sites.

Crafting the Report

The following steps are to be taken from within your MainWP Dashboard.

Custom Report Tokens

Within the Client Reports extension, create the following custom report tokens for use in the new report you will be crafting. After creating the tokens, you will need to visit the edit screen of each site and set the values of each token. (If you’ve been using my monthly report template, you likely already have these set.)

[client.contact.nickname]

This token displays a nickname for the client and is used for the informal salutation at the opening of the report.

[client.logo.url]

This token displays a URL to the client’s logo and is used to embed the client’s logo in the email. Prior to setting this value for each site, you will need to have to have uploaded each logo to a publicly accessible location. For sites that may not have a custom logo, I’ve used this image as my default.

[client.site.domain]

This token cleanly displays the client’s site domain (w/o http:// or https://).

Additionally, you need to set values for [client.name] and [client.site.url].

The HTML

After creating a new client report, you can copy/paste and customize the following code into the Text editor of your Report Body. Leave your Report Header and Report Footer empty.

Note: If you toggle from Text to Visual mode in your editor, WordPress will auto-format certain HTML blocks. This will destroy your styling.

<table style="width: 700px; margin: 0 auto; padding: 0; border-spacing: 0; border-collapse: collapse; background-image: linear-gradient( to left, rgb(215, 215, 215), rgb(231, 211, 186) 300% ); font-size: 14px; color: #3F3F3F"><tbody><tr><td colspan="2" style="background: #040404; margin-top: 0; padding: 0;"><img style="display: block; border: 0; line-height: 1;" alt="Typewheel" src="https://typewheel.xyz/share/typewheel-email-pencil.png" width="700"></td></tr><tr><td colspan="2" style="padding: 2.5em;"><p style="margin-top: 0;">Hello and happy new year, [client.contact.nickname]! Here's a final overview of your website's activity during this past year. Thank you again for trusting your website to Typewheel! I look forward to our continued partnership throughout the coming year.</p><p style="margin-bottom: 0;">Peace in the New Year,<br />Joshua Vandercar</p></td></tr><tr><td style="width: 25%; padding: 0 2em 1em 2.5em;"><img style="display: block; width: 100%; height: auto;" src="[client.logo.url]" alt="[client.name] Logo" height="100"></td><td style="width: 75%; padding: 0 2.5em 0 0;" valign="top"><p style="margin: 0;"><span style="font-size: 200%; font-weight: bold;">[client.name]</span><br /><span style="font-size: 125%; font-weight: bold; font-style: italic;"><a style="color: #3F3F3F; text-decoration: none;" href="[client.site.url]">[client.site.domain]</a></span><br /><span style="font-size: 110%; margin-top: .75em; display: block;">[report.daterange]</span></p></td><tr><td colspan="2"><table style="width: 100%; border-collapse: separate; border-spacing: 2.5em;"><tbody><tr><td colspan="4" style="width: 33%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[ga.visits]</span><br /><span style="font-size: 100%;">Site Visitors</span></td><td colspan="4" style="width: 33%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[ga.new.visits]</span><br /><span style="font-size: 100%;">New Visits</span></td><td colspan="4" style="width: 33%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[ga.pageviews]</span><br /><span style="font-size: 100%;">Page Views</span></td></tr><tr><td colspan="6" style="width: 50%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[post.created.count]</span><br /><span style="font-size: 100%;">Posts Created</span></td><td colspan="6" style="width: 50%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[comment.created.count]</span><br /><span style="font-size: 100%;">Comments Posted</span></td></tr><tr><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[wordpress.updated.count]</span><br /><span style="font-size: 100%;">WP Updates</span></td><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[theme.updated.count]</span><br /><span style="font-size: 100%;">Theme Updates</span></td><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[plugin.updated.count]</span><br /><span style="font-size: 100%;">Plugin Updates</span></td><td colspan="3" style="width: 25%; text-align: center; border-top: 9px solid #E1B653; font-weight: bold; padding-top: .75em;" valign="top"><span style="font-size: 200%;">[backup.created.count]</span><br /><span style="font-size: 100%;">Backups</span></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding: 1.5em 2.5em 0;"><span style="font-size: 135%; font-weight: bold;">Full Activity Report</span></td></tr><tr><td colspan="2" style="padding: 1em 2.5em;"><table style="width: 100%;"><tbody><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Posts Created ([post.created.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.posts.created][post.title] by [post.created.author] on [post.created.date][/section.posts.created]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Users Created ([user.created.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.users.created][user.name] on [user.created.date] as [user.created.role] by [user.created.author][/section.users.created]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Users Deleted ([user.deleted.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.users.deleted][user.name] on [user.deleted.date] by [user.deleted.author][/section.users.deleted]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">WordPress Updates ([wordpress.updated.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.wordpress.updated]WordPress • [wordpress.old.version] to [wordpress.current.version] by [wordpress.updated.author] on [wordpress.updated.date][/section.wordpress.updated]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Theme Updates ([themes.updated.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.themes.updated][theme.name] • [theme.old.version] to [theme.current.version] by [theme.updated.author] on [theme.updated.date][/section.themes.updated]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0;" valign="top"><span style="font-size: 100%; font-weight: bold;">Plugin Updates ([plugins.updated.count])</span><br /><p style="font-size:85%; margin: .5em .5em 1em;">[section.plugins.updated][plugin.name] • [plugin.old.version] to [plugin.current.version] by [plugin.updated.author] on [plugin.updated.date][/section.plugins.updated]</p></td></tr><tr><td style="width: 100%; text-align: left; border-top: 6px solid #3F3F3F; padding: .25em 0 0; font-size: 80%;" valign="top"><span style="font-size: 120%; font-weight: bold;">Uptime Stats ([aum.alltimeuptimeratio] – <em>all time</em>)</span><br /><p style="margin: .5em .5em 1em;">[aum.stats]</p></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding: 1.5em; text-align: center; font-size: 80%; background: #3F3F3F; color: #d7d7d7;"><p><a style="color: #d7d7d7;" href="https://typewheel.xyz/">Typewheel</a> • 7118 Bohnke Dr, Fort Wayne, IN 46815 • <a style="color: #d7d7d7;" href="mailto:joshua@typewheel.xyz">joshua@typewheel.xyz</a><br />Prefer not to receive these reports? Let me know and I will disable them.</p></td></tr></tbody></table>

You will want to comb through this HTML markup, replacing the header image and alt value, paragraph text, footer text, and any color definitions.

Finishing Up

To visually confirm that your report displays as you would like, select a child site and click Send Test Email. Note that the report will only show activity that has been tracked and recorded by the Child Reports plugins installed on each child site and that has been synced with your MainWP dashboard. Thus, if you have just installed any of the extensions, it may take some time before their respective report tokens begin to display content in the report. You should now have something similar to that shown below.

If you have any questions, reach out to me at @uamv or @typewxyz. Send me any reports you cook up. It’d be great to see and share them.

Annual Client Report Example

Wanna show a little love? Hit the ❤️ above.

Refined reporting for MainWP