PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / trunk
Matomo Analytics – Powerful, Privacy-First Insights for WordPress vtrunk
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / js / README.md
matomo / app / js Last commit date
.htaccess 2 years ago LICENSE.txt 6 years ago README.md 2 years ago index.php 2 years ago piwik.min.js 3 months ago tracker.php 1 year ago
README.md
73 lines
1 ## Introduction
2
3 The js/ folder contains:
4
5 * index.php - a servlet described below
6 * piwik.js - the uncompressed piwik.js source for you to study or reference
7 * README.md - this documentation file
8
9 ### Why Use "js/index.php"?
10
11 * js/index.php (or implicitly as "js/") can be used to serve up the minified
12 piwik.js
13
14 * it supports conditional-GET and Last-Modified, so piwik.js can be cached
15 by the browser
16 * it supports deflate/gzip compression if your web server (e.g., Apache
17 without mod_deflate or mod_gzip), shrinking the data transfer to 8K
18
19 * js/index.php (or implicitly as "js/") can also act as a proxy to matomo.php
20
21 * If you are concerned about the impact of browser-based privacy filters which
22 attempt to block tracking, you can change your tracking code to use "js/"
23 instead of "piwik.js" and "matomo.php", respectively.
24
25 Note that in order for [](https://matomo.org/docs/page-overlay/Page Overlay](https://matomo.org/docs/page-overlay/](https://matomo.org/docs/page-overlay/) to work, the Piwik tracker method `setAPIUrl()` needs to be called with its parameter pointing to the root directory of Piwik. E.g.:
26
27 ```js
28 _paq.push(['setAPIUrl', u]);
29
30 ```
31
32 ## Deployment
33
34 To minify core JavaScript you may run the following command (with Development Mode enabled):
35
36 ```bash
37 $ ./console development:build-tracker-js
38 ```
39
40 (Note: this command can also be used to minify plugin tracker JavaScript.)
41
42 To manually minify the file:
43
44 * piwik.js is minified using YUICompressor 2.4.8.
45 To install YUICompressor run:
46
47 ```bash
48 $ cd /path/to/piwik/js/
49 $ wget https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip
50 $ unzip yuicompressor-2.4.8.zip
51 ```
52
53 To compress the code containing the evil "eval", run:
54
55 ```bash
56 $ cd /path/to/piwik/js/
57 $ sed '/<DEBUG>/,/<\/DEBUG>/d' < piwik.js | sed 's/eval/replacedEvilString/' | java -jar yuicompressor-2.4.8.jar --type js --line-break 1000 | sed 's/replacedEvilString/eval/' | sed 's/^[/][*]/\/*!/' > piwik.min.js && cp piwik.min.js ../piwik.js && cp piwik.min.js ../matomo.js
58 ```
59
60 This will generate the minify /path/to/piwik/js/piwik.min.js and copy it to
61 /path/to/piwik/piwik.js. Both "js/piwik.min.js" and "piwik.js" need to be committed.
62
63 We recommend to execute this command under Linux. It has not been tested with Windows and
64 MacOS might add a trailing newline which fails tests.
65 VisitorGeolocatorTest
66 * In a production environment, the tests/javascript folder is not used and can
67 be removed (if present).
68
69 * We use /*! to include Piwik's license header in the minified source. Read
70 Stallman's "The JavaScript Trap" for more information.
71
72 * Information about the current version number you have installed can be found under [](https://matomo.org/faq/how-to-update/faq_8/What version of Piwik do I have?](https://matomo.org/faq/how-to-update/faq_8/](https://matomo.org/faq/how-to-update/faq_8/).
73