Simple Analytics allow to integrate a site analysis code easily.
User can use internal tracking system (Very simple) and / or integrate a Google analytics code, Piwik analytics code or any other custom code. The integrated code can display on all pages, exclude admin pages or display only for anonymous users. Permission to view history of internal statistic can manage, to display to the anonymous users.
By default:
- No tracking for admin pages (/admin)
- Internal tracking system enabled.
Similar projects
Different with this project : This project include Google Analytics, Piwik analytics, Other custom analytics system and also intergrated basic analytics system.
Installation
Install the module as a normal drupal module.
Example (By drush):
drush en simple_analytics -y
Optional
Chartist-js Library
Website : https://gionkunz.github.io/chartist-js/
Git : https://github.com/gionkunz/chartist-js/tree/master/dist
Files:
- chartist.min.js (https://github.com/gionkunz/chartist-js/blob/master/dist/chartist.min.js)
- chartist.min.css (https://github.com/gionkunz/chartist-js/blob/master/dist/chartist.min.css)
Library folder : DRUPAL_ROOT_DIR/libraries/chartist-js
Project Page:
https://www.drupal.org/project/simple_analytics
GIT repositories:
https://git.drupal.org/project/simple_analytics.git
git clone command:
git clone --branch 8.x-2.x https://git.drupal.org/project/simple_analytics.git
Thank you to validate my application.
| Comment | File | Size | Author |
|---|---|---|---|
| Today.png | 75.76 KB | nuwans | |
| History.png | 48.05 KB | nuwans | |
| Configurations.png | 38.04 KB | nuwans |
Comments
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxNuWans2616392git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #4
nuwans commentedComment #5
nuwans commentedComment #6
REDrupalPlugin commentedUsing Coder I found the following issues (learn more about coder and coding practices at https://www.drupal.org/project/coder
phpcs --standard=Drupal *
FILE: ...agner/Dropbox/projects/simple_analyse/lib/chart/chartist.min.css
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
----------------------------------------------------------------------
FILE: ...wagner/Dropbox/projects/simple_analyse/lib/chart/chartist.min.js
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
----------------------------------------------------------------------
FILE: ...rkwagner/Dropbox/projects/simple_analyse/simple_analyse.info.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
1 | WARNING | Remove "version" form the info file, it will be added
| | by drupal.org packaging automatically
----------------------------------------------------------------------
FILE: ...ner/Dropbox/projects/simple_analyse/simple_analyse.libraries.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...er/Dropbox/projects/simple_analyse/simple_analyse.links.menu.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 3 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...r/Dropbox/projects/simple_analyse/simple_analyse.permissions.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 328ms; Memory: 11.5Mb
Comment #7
kari.kaariainen commentedWhat is "intanal tracking system"? Do you mean internal?
Comment #8
nuwans commentedThank You for the correction, And can any one help me to remove this warning because of compressed JS and CSS ?
Thank you.
Comment #9
nuwans commentedComment #10
kari.kaariainen commentedAccording to https://www.drupal.org/node/2453587 and https://www.drupal.org/node/1556034 it seems nothing can be done at the moment about the minify errors so they can just be ignored.
Comment #11
nuwans commentedThankyou !!!
Comment #12
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #13
kari.kaariainen commentedSimple Analyse is an awkward name. Simple Analysis would be correct English but you may be looking for Simple Analytics.
Comment #14
nuwans commentedHello,
I make 'Check Drupal coding standards' and 'Check Drupal best practices' corrections. But I don't know how to fix compressed js problems.
Thank you.
Comment #15
arun ak commentedHi,
I did a manual review, please see my findings below:
$html .= "<table>"; $html .= "<th>"; ...in SimpleAnalyseService.php.<script>tag insidesimple-analyse-chart-01.html.twig,simple-analyse-pw.html.twig,simple-analyse-sa.html.twigfiles.Thanks,
ARUN AK
Comment #16
nuwans commentedHello,
Thank you ARUN AK. I make all changes except N°4, because those are dynamically generated JS. Please let me know if there are any way to include dynamic JavaScripts.
Thank you.
Comment #17
arun ak commentedok. I will do one more round of review. By the way did you check how Google Analytics module is adding analytics script in to pages.
Comment #18
nuwans commentedThank you ARUN,
I just did it, they build a script like : $script = '(function(i,s,o,g,r,a,m){'; .... then attach as a script. If you think it's better to do like this. I can change.
Comment #19
kamdanishit commentedHI Nuwans,
You have mentioned in libraries.yml
lib/chart/simple_analyse.css: {}but that css or folder is not in your repository,
Correct me If I'm wrong
Comment #20
nuwans commentedHi Nishit,
It was deleted by mistake. I added the file and make few improvements.
Thank you.
Comment #21
pucowanje commentedDownloaded and tested this module.
It would be nice if you would mention the external dependency of chartist-js on your project page. It is perfectly mentioned in your Readme file but at least for me, i don't read Readme files up until i have downloaded the module.
The module itself is working at least for Piwik. I haven't tested Google Analytics due to a lack of an Analytics account. As mentioned by others before, i dislike the name too. When scrolling through the list of modules in the issue queue, i did not expect this module to be about Analytics.
For Piwik and GA, there are existing Modules doing a great job. I would prefer using the existing Piwik module since it offers a better integration, more options and i would not really use the charts since the charts within Piwik Backend are much better in detail. But there might be a use for people that don't want to log into Piwik or GA for charts.
Comment #22
nuwans commentedComment #23
nuwans commentedHello,
Thank you, I added the "Requirement" to the project page. Yes, with this module you use any type of analytics GA, Piwik, another or built in analytics system.
Comment #24
nuwans commentedComment #25
nuwans commentedComment #26
nuwans commentedComment #27
nuwans commentedHello,
I make few improvements and add SimpleTest tests. Now the Chartist-js Library is optional and can use the module without it.
Thank you for validation my application.
Rgds.
Comment #28
Aaron23 commentedI have checked the site in https://pareview.sh/node/1839
Minor issues are there,
Bad line endings were found, always use unix style terminators. See https://www.drupal.org/coding-standards#indenting
./composer.json: ASCII text, with CRLF line terminators
composer.json
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: /root/repos/pareviewsh/pareview_temp/simple_analytics.module
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
121 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
Time: 286ms; Memory: 10Mb
Comment #29
zakaria.elhariri commentedHi,
I have installed this module locally and i have some warning :
1. Page : admin/reports/simple_analytics/view/today
2. Page : admin/reports/simple_analytics/view/today
3. Page : admin/reports/simple_analytics/view/today
Notice: Undefined property: stdClass::$visit_last in Drupal\simple_analytics\Controller\SimpleAnalytics->viewToday() (line 95 of modules/simple_analytics/src/Controller/SimpleAnalytics.php).
4. Page : admin/reports/simple_analytics/view/history
I just installed this module and i have this page : http://i.imgur.com/SuoUM81.png . I found it a bit strange, maybe it's better to only show the date since the module was installed and the statistics start to be saved
Comment #30
nuwans commentedHi Santhosh Fernando,
Hi zakaria340,
Thank you for your reviews, I make the changes and few other improvements.
@ zakaria340 At the begin, I let 7 days. Please Reinstall the module to remove old data.
Please let me know if there are any thing.
Thank you,
Comment #31
nuwans commentedComment #32
matroskeenHello, @NuWans,
I've made a manual review of your code and created few issues under module issues queue - https://www.drupal.org/project/issues/simple_analytics.
Please take a look, thanks!
Comment #33
nuwans commentedHi @Matroskeen,
I have make lot of corrections can you please review it.
And please let me know other points to improve.
Thank you very much.
(changes are in the -dev version)
Comment #34
sleitner commentedAutomated Review
Pareview details: https://pareview.sh/pareview/https-git.drupal.org-project-simple_analyti...
Review of the 8.x-2.x branch (commit 3c1496d):
This automated report was generated with PAReview.sh, your friendly project application review script.
Manual Review
Visitor's Setingsshould beVisitor's settingsin simple_analytics.links.task.ymlNotice: Undefined property: stdClass::$extra in Drupal\simple_analytics\Controller\SimpleAnalytics->viewToday() (line 77Notice: Undefined property: stdClass::$LINK in Drupal\simple_analytics\Controller\SimpleAnalytics->viewToday() (line 77Notice: Undefined property: stdClass::$Duration in Drupal\simple_analytics\Controller\SimpleAnalytics->viewVisiter() (line 198The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #35
avpadernoIf you are still working on this application, you should fix all known problems and set the status to Needs review. (See also the project application workflow.)
Please don't change status of this application if you aren't sure you have time to dedicate to this application, or it will be closed again as won't fix.
I am closing this application due to lack of activity.