[plugin] Advanced statistics plugin

3rd party code for phpList

[plugin] Advanced statistics plugin

Postby duncanc » 9:06pm, Fri 21 Jan, 2011

This plugin provides comprehensive statistics on each sent campaign.
  • provides a summary of statistics for each campaign, and a chart of all campaigns
  • shows users who have opened, not opened, clicked, bounced and forwarded the campaign
  • shows opens and clicks summarised by domain
  • shows a summary of clicks for each link URL and the users who have clicked that URL
  • page through the sets of results, selecting the number of items to show per page, including showing all items
  • download each set of results
  • column headings are sortable
  • can select user attributes to be displayed as extra columns on each tab
  • translation of text into French, German and Traditional Chinese
  • help text for each tab
The differences from the core statistics are
  • phplist core requires click tracking to be enabled even to see only user tracking results. This plugin does not require that.
  • provides download of user who have opened/not opened/clicked/bounced
  • shows how many links each user has clicked
See this page for how to enable user tracking or click tracking http://docs.phplist.com/MessageTracking

Messages tab
ScreenShot002.gif
ScreenShot002.gif (33.45 KiB) Viewed 1345 times

Opened tab
ScreenShot003.gif
ScreenShot003.gif (20.07 KiB) Viewed 1345 times

Install
There are separate versions of the plugin for phplist 2.10.x and phplist 3.x.

For phplist 3.x see the GitHub page https://github.com/bramley/phplist-plugin-statistics
This version requires php release 5.2 or later.

The plugin for phplist 2.10.x is no longer maintained but see this topic for the plugin files that need to be downloaded and installation instructions http://forums.phplist.com/viewtopic.php?f=7&t=37421
This version requires php release 5.1 or later.
duncanc
Moderator
 
Posts: 1948
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: [plugin] Message statistics plugin

Postby Dragonrider » 8:30am, Sat 22 Jan, 2011

Works instantly upon uploading and then viewing. No fuss what so ever, many thanks!
Dragonrider
Moderator
 
Posts: 2942
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: [plugin] Message statistics plugin

Postby lindajm22 » 5:46pm, Sun 23 Jan, 2011

This plugin works great! My web host moved my site to a server with PHP 5 and I can finally get this working. Much better than the original. Nice work and thank you!

I do have one question. How can I add another column on the pages showing the users to include a last name attribute that I collect on each user? I was able to add it to my main users page in PHPList, but I just don't know where to put it in this plugin.

Thanks!
lindajm22
phpLister
 
Posts: 6
Joined: 5:25am, Tue 21 Dec, 2010

Re: [plugin] Message statistics plugin

Postby duncanc » 8:31pm, Sun 23 Jan, 2011

I do have one question. How can I add another column on the pages showing the users to include a last name attribute that I collect on each user?


Find the id of the user attribute that you want to add from the attributes page.

To include that attribute value to the list of viewers of a message you need to change the code of the populate() method in the class Populator_viewed.

Replace lines 137-146 with the following and change the 1 to be whatever your attribute id is ( I would usually show this within a code block but highlighting the changes in red seems more useful)


$resource = Sql_query(<<<END
SELECT um.messageid, um.userid, um.entered, um.viewed, u.email, ua.value, at.name
FROM {$tables['usermessage']} um
JOIN {$tables['user']} u
ON um.userid = u.id
JOIN {$tables['user_attribute']} ua
ON ua.userid = u.id
JOIN {$tables['attribute']} at
ON at.id = ua.attributeid

WHERE um.messageid = $this->msgid AND um.viewed IS NOT NULL AND at.id = 1
order by um.viewed
LIMIT $start, $limit
END
);

Then add this line after the current row 149 to include the attribute value as an extra column with a column title of the attribute name:
Code: Select all
         $w->addColumn($row['email'], $row['name'], $row['value'], '', 'left');

You can make similar changes to the code for the non-viewers or clickers of a message in the method populate() in the classes Populator_notviewed and Populator_clicked.

I'll see if I can devise a way to include this in the plugin code so that the extra column is optional.
duncanc
Moderator
 
Posts: 1948
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: [plugin] Message statistics plugin

Postby lindajm22 » 11:57pm, Sun 23 Jan, 2011

Thank you so much for the code, which worked perfectly. Not sure I changed the clicked code correctly as I did not have that feature turned on, but I just turned it on and will do a little testing.

Thanks again.
Linda
lindajm22
phpLister
 
Posts: 6
Joined: 5:25am, Tue 21 Dec, 2010

Re: [plugin] Message statistics plugin

Postby duncanc » 9:44pm, Sun 30 Jan, 2011

I have added functionality to display an extra column showing a user attribute on the pages of viewers, non viewers, and clickers of a message. The new plugin file is attached to the first post of this topic.
duncanc
Moderator
 
Posts: 1948
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: [plugin] Message statistics plugin

Postby duncanc » 5:58pm, Sat 12 Feb, 2011

I have added an extra tab to show the email addresses that bounced for a message.
The new plugin file is attached to the first post of this topic.
duncanc
Moderator
 
Posts: 1948
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: [plugin] Message statistics plugin

Postby dubwise259 » 4:56pm, Mon 21 Feb, 2011

Very nice, it works out of the box !! :D
Thanks a lot.
dubwise259
PL Nut
 
Posts: 39
Joined: 11:58am, Mon 19 Nov, 2007

Re: [plugin] Message statistics plugin

Postby cdogstu99 » 10:42pm, Wed 23 Feb, 2011

can someone help out a newbie installing this? do i upload to the plugins folder just as is? with the two subfolders as "common plugin" and "messagestatisticsplugin" or is it just the "messagestatisticsplugin" folder that needs to be uploaded? Anything else i need to do to activate?
cdogstu99
phpLister
 
Posts: 5
Joined: 10:39pm, Wed 23 Feb, 2011

Re: [plugin] Message statistics plugin

Postby duncanc » 11:05pm, Wed 23 Feb, 2011

Easiest is to upload the zip file to your host plugin directory then expand.
If you are expanding on your pc, then upload both folders (otherwise why would both be there? :wink: ).

Nothing else to do, so long as your config.php is pointing to the correct plugins folder.
duncanc
Moderator
 
Posts: 1948
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: [plugin] Message statistics plugin

Postby NYChris » 5:56pm, Thu 24 Feb, 2011

Not working with PHP 5.2.11 & PHPList 2.10.12

Just getting a blank screen and no errors.

Directory structure:
/admin/plugins
/admin/plugins/CommonPlugin
/admin/plugins/MessageStatisticsPlugin

I have 2 other plugins in the plugins directory that work with config.php pointing at "PLUGIN_ROOTDIR","plugins".
They work fine.
I tried pointing config.php at "PLUGIN_ROOTDIR","plugins/MessageStatisticsPlugin" and got no joy.
NYChris
PL Geek
 
Posts: 50
Joined: 4:55pm, Mon 29 Jun, 2009

Re: [plugin] Message statistics plugin

Postby dubwise259 » 2:51pm, Wed 09 Mar, 2011

NYChris wrote:Not working with PHP 5.2.11 & PHPList 2.10.12


It works well with PHP 5.3.3 and phplist 2.10.13
dubwise259
PL Nut
 
Posts: 39
Joined: 11:58am, Mon 19 Nov, 2007

Re: [plugin] Message statistics plugin

Postby dubwise259 » 3:35pm, Wed 09 Mar, 2011

duncanc wrote:I have added functionality to display an extra column showing a user attribute on the pages of viewers, non viewers, and clickers of a message. The new plugin file is attached to the first post of this topic.


Hi Duncanc,

Is there any simple way to include this extra column in the CSV ?

Best Regards
dubwise259
PL Nut
 
Posts: 39
Joined: 11:58am, Mon 19 Nov, 2007

Re: [plugin] Message statistics plugin

Postby duncanc » 9:59pm, Wed 09 Mar, 2011

dubwise259 wrote:
Is there any simple way to include this extra column in the CSV ?

Best Regards

I have amended the plugin so that the download includes all of the displayed fields. See the first post of this topic for the new files.
duncanc
Moderator
 
Posts: 1948
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: [plugin] Message statistics plugin

Postby dubwise259 » 1:09pm, Thu 10 Mar, 2011

duncanc wrote:I have amended the plugin so that the download includes all of the displayed fields. See the first post of this topic for the new files.


Hi Duncanc,

Wow...very fast, thank you very much !
It's ok for the downloaded files, the displayed fields are well included, but the "select attribute" option has disappeared, I can't see anything like your ScreenShot001.gif while it was there with the previous version.
Anyway, I'm gonna try to investigate why it's missing and once again, thanks a lot for your help.
Best regards
dubwise259
PL Nut
 
Posts: 39
Joined: 11:58am, Mon 19 Nov, 2007

Next

Return to Contributions: Plug-ins, Add-ons, Mods

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests