Async Tracking Issue (1.6)


I’ve been working with Piwik for the past week (so I’m still new at it), attempting to track user activity on my site. Prior to adding asynchronous tracking, everything was working. Mainly I am using trackPageView and setCustomData in the Javascript API.

Under async tracking, the dashboard is not displaying any information. The last activity recorded in Piwik was when I wasn’t using asynchronous tracking. I’ve read a lot of forum posts and everything on the website about asynchronous tracking but I just can’t get it working. Please help me! Thank you.

I added the tracker as follows (yes my Piwik is on localhost):

<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
    var u=(("https:" == document.location.protocol) ? "https://localhost/piwik" : "http://localhost/piwik");
    _paq.push(['setSiteId', 6]);
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    var d=document,
<!-- End Piwik Code -->

and call the tracker functions as follows:

_paq.push(['trackPageView', 'Clicked Log-In Button']);

There are no Javascript errors on my Firebug, and I’m running Firefox 3.6 (old I know).

EDIT: I’m updating my Firefox and Firebug

It’ll work better with a trailing slash on the paths, i.e., “…localhost/piwik/”

(Edit: Sorry, I had to play with the formatting so it displays properly in the forum.)

var u=(("https:" == document.location.protocol) ? "https:"+"//localhost/piwik/" : "http:"+"//localhost/piwik/" ) ;

I coulda sworn I had that at one point…

But after copying and pasting your code it works, so thank you!!