A method for knowing the current website?

(JeanRey) #1

Hi all,
Is there a method to get back the name of the current website?

(Karlsson) #2

What do you mean exactly?

Are you tracking multiple sites with one Piwik-installation? In this case you can see the current site in the upper right corner of your dashboard:[attachment=117:piwik.gif]

(JeanRey) #3

I’m developing a plugin and i would like to display the name of the current website inside.

(vipsoft) #4


    siteName = piwik.siteName;


    $idSite = Piwik_Common::getRequestVar('idSite');
    $site = new Piwik_Site($idSite);
    $siteName = $site->getName();