formmailer Posted November 22, 2011 Share Posted November 22, 2011 Hi! I just finished the first release of my first PW module: Piwik Top Keywords: https://github.com/f...ik-Top-Keywords This module can be used to create a tag cloud based on the keywords that visitors use to find your site (referrer keywords). These keywords are fetched from your Piwik installation. For those that don't know Piwik, it's an open source alternative for Google Analytics, more info on http://piwik.org. The keywords are, as a query, linked to ProcessWire's search page.* The module can be configured from the admin area, but it's also possible to configure it in your template. In order to reduce the load on your Piwik installation and avoid delays when rendering your pages, it makes sense to use it on cache enabled templates only. I am sure that the code can be improved, since it is my first module and because of the fact that I am not an experienced PHP developer. If you have any suggestions, please let me know. To Install: 1. Download the file attached (PiwikTopKeywords.module) to this post and place in /site/modules/. Go to Modules in the admin, 'Check for new modules' and click install for Piwik Top Keywords under the Piwik section. 2. Add the following to your CSS style sheet: #PiwikTagcloud {list-style-type:none; margin:0px; padding:0px; text-align: center;} #PiwikTagcloud li {display:inline !important; margin-right:15px; line-height:1.5em;} #PiwikTagcloud li a {display:inline; text-decoration: none;} #PiwikTagcloud a:hover {text-decoration: underline;} #PiwikTagcloud .smallest {font-size: 100%;} #PiwikTagcloud .small {font-size: 125%;} #PiwikTagcloud .medium {font-size:150%;} #PiwikTagcloud .large {font-size:170%;} #PiwikTagcloud .largest {font-size:200%;} To use: Add the following to your template: $PiwikTopKeywords = $modules->get("PiwikTopKeywords"); $PiwikTopKeywords->DisplayTopKeywords(); I also attached a screenshot of the output and a screenshot of the admin area: I'm not sure how many of you use Piwik and how many will use this module, but if it's helpful to anyone I am more than happy! //Jasper * Edit: I just realised that is your site doesn't have a search page, you might want to link the keywords to a Google site-search. Simply use the following Search URL in the config: http://www.google.com/#q=site:yoursite.com+ 1 Link to comment Share on other sites More sharing options...
ryan Posted November 22, 2011 Share Posted November 22, 2011 Formmailer, thanks for making this – it looks like you've done a very nice and complete job putting this together. I look forward to testing this out! Link to comment Share on other sites More sharing options...
formmailer Posted November 22, 2011 Author Share Posted November 22, 2011 Thought I could learn something more today, so I created a Github repository for this module. Updated the first post with the link to the Github repository. /Jasper Link to comment Share on other sites More sharing options...
ryan Posted November 24, 2011 Share Posted November 24, 2011 I haven't been able to test this one out yet– I want to learn more about the Piwik software and understand it all before I install to my server. However, I'm very intrigued by what I've read so far on their web site. I did get to look at your module's code and it looks very well put together in all respects: code, comments and documentation. Thank you for your work with this module. I can't wait to use it and am thinking this is one I will definitely be using a lot on my sites and client sites. Link to comment Share on other sites More sharing options...
formmailer Posted November 24, 2011 Author Share Posted November 24, 2011 I am glad you like it. I started using Piwik a few months ago and I was very impressed. The day after I installed it, I figured that I wouldn't need Google Analytics anymore, but I used them together just to see if there were some major differences in tracking. It turned out that the stats were almost the same (a few minor differences occured, but that could have been caused by my own visits, that Piwik ignored and GA tracked). Now I stopped using Google Analytics on most of my sites and I am only using Piwik instead. Jasper Link to comment Share on other sites More sharing options...
Jeroen Posted August 11, 2012 Share Posted August 11, 2012 Hi Jasper, I noticed a little typo. Tried to change it via git. As I'm totally new to github, I'm not sure if I did the right thing. Anyway: line 74 says piwik_max_kewords i/o piwik_max_keywords That's all Cheers, J 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now