diff options
Diffstat (limited to 'js/piwik.js')
-rw-r--r-- | js/piwik.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/piwik.js b/js/piwik.js index 5463c308f5..c0883c82ab 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -6895,6 +6895,12 @@ if (typeof window.Piwik !== 'object') { // we only create an initial tracker if there is a configuration for it via _paq. Otherwise // Piwik.getAsyncTrackers() would return unconfigured trackers window.Piwik.addTracker(); + } else { + _paq = {push: function (args) { + if (console !== undefined && console && console.error) { + console.error('_paq.push() was used but Piwik tracker was not initialized before the piwik.js file was loaded. Make sure to configure the tracker via _paq.push before loading piwik.js. Alternatively, you can create a tracker via Piwik.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.', args); + } + }}; } } |