Piwik extension

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Piwik extension

Postby hansfn » Sun Jul 26, 2009 10:46 am

This is the discussion topic for the Piwik extension.

Visit http://extensions.pivotx.net/entry/35/piwik for download and more info.

PS! There is also a Google Analytics extension - visit http://extensions.pivotx.net/entry/14/googleanalytics
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Piwik

Postby verbaljam » Mon May 10, 2010 10:29 pm

One stupid question: apart from enabling the extension in de PivotX admin, do I still have to upload the Piwik package or is it pre-installed on the server with the PivotX installation?
If you read Dutch, you read Verbal Jam.
Lack of documentation makes even the best program useless...
verbaljam
 
Posts: 143
Joined: Thu Apr 22, 2010 8:32 am
Location: Amsterdam

Re: Piwik

Postby hansfn » Tue May 11, 2010 8:27 am

You have to upload Piwik separately. (You have to set the URL to Piwik in the configuration.)

PS! The current version of Piwik - 0.6.1 - includes exclusion visits by IP (and exclusion of URL parameters). This doesn't break the exclusion functionality in the PivotX extension - it just makes it unnecessary.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Piwik

Postby verbaljam » Tue May 11, 2010 9:37 am

Thanks very much for your answer, Hans. I'm gonna try it out.
If you read Dutch, you read Verbal Jam.
Lack of documentation makes even the best program useless...
verbaljam
 
Posts: 143
Joined: Thu Apr 22, 2010 8:32 am
Location: Amsterdam

Re: Piwik

Postby verbaljam » Tue May 11, 2010 4:13 pm

Feedback:
I have the suspicion that the extension doesn't work. I installed Piwik (latest version of course), activated the extension in de PivotX admin. I checked if the code appeared in the page source. It did.
But Piwik did'nt count anything.
After that I switched off the extension again, implemented the script that Piwik itself proposed and after that it worked.
Maybe the script that the extension puts into the pages needs a small update?
BTW: I use PivotX 2.1.0: beta 4.
If you read Dutch, you read Verbal Jam.
Lack of documentation makes even the best program useless...
verbaljam
 
Posts: 143
Joined: Thu Apr 22, 2010 8:32 am
Location: Amsterdam

Re: Piwik

Postby hansfn » Tue May 11, 2010 4:35 pm

Well, I'm eating my own dog food, i.e., using the extension all the time on my own sites so I expect the problem might be something else. Have you an URL I can visit to see what output the extension produces for your site. Have you even looked at the HTML source code or looked at the PivotX debug log?
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Piwik

Postby verbaljam » Tue May 11, 2010 5:05 pm

Hans, the code that comes with the Piwik installation (and that I inserted manually) is this:
Code: Select all
<!-- De Piwik tracking code (manually inserted, not via extension-->
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://verbaljam.nl/piwik/" : "http://verbaljam.nl/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://verbaljam.nl/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tag -->

<!-- END Piwik tracking code -->


The code that the extension produces is (copied from page source):
Code: Select all
    <!-- Piwik -->
    <script type="text/javascript" src="http:/verbaljam.nl/piwik/piwik.js"></script>
    <script type="text/javascript">
        try {
            var piwikTracker = Piwik.getTracker("http:/verbaljam.nl/piwik/piwik.php", );
            piwikTracker.trackPageView();
            piwikTracker.enableLinkTracking();
        } catch( err ) {}
    </script>

    <!-- End Piwik Tag -->


My Piwik install is at: http://verbaljam.nl/piwik (don't know if you can seed that).
If you read Dutch, you read Verbal Jam.
Lack of documentation makes even the best program useless...
verbaljam
 
Posts: 143
Joined: Thu Apr 22, 2010 8:32 am
Location: Amsterdam

Re: Piwik

Postby hansfn » Tue May 11, 2010 6:46 pm

Looking at the output it seems you have made two errors in the Piwik extension configuration:
1) Is the "Piwik Website ID" field empty? It should be 1.
2) In addition it seems that "Piwik URL" is set to "http:/verbaljam.nl/piwik/piwik.js". There is a missing slash. You can just use "/piwik/" - you don't have to include protocol (http) and domain name. That is also much more portable.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Piwik

Postby verbaljam » Tue May 11, 2010 7:18 pm

Okay, Hans, I understand now and I will give it a new try.

But I think the errors I made (and other average users will make) are due to the lack of documentation. I see it with other extensions as well.

a. When activating the extension, the piwik admin page fills in an id by default: -1. How am I supposed to know it should be 1?
b. Also there is no indication that the url should be given as /piwik/.

NB, this is not meant as criticism, but it should be a point of special attention, as a little bit more documentation prevents a lot of unnecessary questions like this one and it makes the PivotX system more accessable to the average user.

Anyway, thanks very much for your help and efforts.

Update:

The code in the page source now looks like:
Code: Select all
    <!-- Piwik -->
    <script type="text/javascript" src="/piwik/piwik.js"></script>
    <script type="text/javascript">
        try {
            var piwikTracker = Piwik.getTracker("/piwik/piwik.php", 1);
            piwikTracker.trackPageView();
            piwikTracker.enableLinkTracking();
        } catch( err ) {}
    </script>
    <!-- End Piwik Tag -->


Let's see if it works. ;-)
If you read Dutch, you read Verbal Jam.
Lack of documentation makes even the best program useless...
verbaljam
 
Posts: 143
Joined: Thu Apr 22, 2010 8:32 am
Location: Amsterdam

Re: Piwik

Postby hansfn » Tue May 11, 2010 7:39 pm

The URL doesn't have to be "/piwik/" - you can use the complete URL as you did. The tool tip for website ID says "The id for the website as found in the Piwik website overview." How much clearer can that be? OK, maybe it's better that the default is 1 so most users are lucky and get it right without doing anything... -1 was supposed to be a way-off value ;-)
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 4 guests