Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a function in my functions.php that calls my custom tracking JavaScript file. It relies on Piwik's JavaScript to be loaded beforehand or else I get this error:

Uncaught ReferenceError: piwikTracker is not defined

So instead I add the dependency like this:

wp_register_script('custom_tracking',get_bloginfo('stylesheet_directory') . '/js/custom_tracking.js', array('jquery', 'wp-piwik') );

Now this works in Chrome but not IE. I can see that the custom_tracking.js is not loaded and the tracking never occurs. If I remove the dependency, the tracking occurs on IE, but shows the error in the console in Chrome.

I posted in the Piwik forums but I don't see why the dependency works in Chrome but not IE and the non-dependency works in IE but not Chrome.

share|improve this question
This is a Piwik issue, and since you've already posted in their forums (the correct place for Piwik support) I'm closing as off-topic. – EAMann Jul 19 '12 at 15:42

closed as off topic by EAMann Jul 19 '12 at 15:42

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.