Skip to content

Commit

Permalink
Support window.Matomo in JS Tracker (matomo-org#13568)
Browse files Browse the repository at this point in the history
* support window.Matomo in JS Tracker

* Fix integration tests.
  • Loading branch information
tsteur authored and InfinityVoid committed Oct 11, 2018
1 parent 45ef608 commit 3077327
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions js/piwik.js
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ if (typeof JSON_PIWIK !== 'object' && typeof window.JSON === 'object' && window.
/*global unescape */
/*global ActiveXObject */
/*global Blob */
/*members Piwik, encodeURIComponent, decodeURIComponent, getElementsByTagName,
/*members Piwik, Matomo, encodeURIComponent, decodeURIComponent, getElementsByTagName,
shift, unshift, piwikAsyncInit, piwikPluginAsyncInit, frameElement, self, hasFocus,
createElement, appendChild, characterSet, charset, all,
addEventListener, attachEvent, removeEventListener, detachEvent, disableCookies,
Expand Down Expand Up @@ -1053,7 +1053,7 @@ if (typeof _paq !== 'object') {

// Piwik singleton and namespace
if (typeof window.Piwik !== 'object') {
window.Piwik = (function () {
window.Matomo = window.Piwik = (function () {
'use strict';

/************************************************************
Expand Down Expand Up @@ -7670,6 +7670,7 @@ if (typeof window.Piwik !== 'object') {
// Expose Piwik as an AMD module
if (typeof define === 'function' && define.amd) {
define('piwik', [], function () { return Piwik; });
define('matomo', [], function () { return Piwik; });
}

return Piwik;
Expand Down
10 changes: 5 additions & 5 deletions js/piwik.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3077327

Please sign in to comment.