how to get data from piwik in JS. Thank You!
Via HTTP-request and analytics API.
At the top of your PIWIK-site there is a link called API. There you find a list of all available methods with examples as well as some useful links.
On JS side you have to use AJAX (XMLHttpRequests).
For the Piwik side please refer to the docs, guides and API-reference available online, which are very detailed. You can find them eg here: