Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (14984)

  • What Is Data Ethics & Why Is It Important in Business ?

    9 mai 2024, par Erin

    Data is powerful — every business on earth uses data. But some are leveraging it more than others.

    The problem ?

    Not all businesses are using data ethically.

    You need to collect, store, and analyse data to grow your business. But, if you aren’t careful, you could be crossing the line with your data usage into unethical territories.

    In a society where data is more valuable than ever, it’s crucial you perform ethical practices.

    In this article, we break down what data ethics is, why it’s important in business and how you can implement proper data ethics to ensure you stay compliant while growing your business.

    What is data ethics ?

    Data ethics are how a business collects, protects and uses data.

    It’s one field of ethics focused on organisations’ moral obligation to collect, track, analyse and interpret data correctly.

    Data ethics analyses multiple ways we use data :

    • Collecting data
    • Generating data
    • Tracking data
    • Analysing data
    • Interpreting data
    • Implementing activities based on data

    Data ethics is a field that asks, “Is this right or wrong ?”

    And it also asks, “Can we use data for good ?”

    If businesses use data unethically, they could get into serious hot water with their customers and even with the law.

    You need to use data to ensure you grow your business to the best of your ability. But, to maintain a clean slate in the eyes of your customers and authorities, you need to ensure you have strong data ethics.

    Why you need to follow data ethics principles

    In 2018, hackers broke into British Airways’ website by inserting harmful code, leading website visitors to a fraudulent site. 

    The result ? 

    British Airways customers gave their information to the hackers without realising it : credit cards, personal information, login information, addresses and more.

    While this was a malicious attack, the reality is that data is an integral part of everyday life. Businesses need to do everything they can to protect their customers’ data and use it ethically.

    Data ethics is crucial to understand as it sets the standard for what’s right and wrong for businesses. Without a clear grasp of data ethics, companies will willingly or neglectfully misuse data.

    With a firm foundation of data ethics, businesses worldwide can make a collective effort to function smoothly, protect their customers, and, of course, protect their own reputation. 

    3 benefits of leaning into data ethics

    We’re currently transitioning to a new world led by artificial intelligence.

    While AI presents endless opportunities for innovation in the business world, there are also countless risks at play, and it’s never been more important to develop trust with your customers and stakeholders.

    With an influx of data being created and tracked daily, you need to ensure your business is prioritising data ethics to ensure you maintain trust with your customers moving forward.

    Diagram displaying the 3 benefits of data ethics - compliance, increased trust, maintain a good reputation.

    Here are three benefits of data ethics that will help you develop trust, maintain a solid reputation and stay compliant to continue growing your business :

    1. Compliance with data privacy

    Privacy is everything. 

    In a world where our data is being collected nonstop, and we live more public lives than ever with social media, AI and an influx of recording and tracking in everyday life, you need to protect the privacy of your customers.

    One crucial way to protect that privacy is by complying with major data privacy regulations.

    Some of the most common regulations you need to remain compliant with include :

    • General Data Protection Regulation (GDPR)
    • California Consumer Privacy Act (CCPA)
    • Health Insurance Portability and Accountability Act (HIPAA)
    • General Personal Data Protection Law (LGPD)
    • Privacy and Electronic Communications (EC Directive) Regulations (PECR)

    While these regulations don’t directly address ethics, there’s a core overlap between privacy requirements like accountability, lawfulness and AI ethics.

    Matomo ensures you protect the privacy of your web and app users so you can track and improve your website performance with peace of mind.

    2. Maintain a good reputation

    While data ethics can help you maintain data privacy compliance, it can also help you maintain a good reputation online and offline.

    All it takes is one bad event like the British Airways breach for your company’s reputation to be ruined.

    If you want to keep a solid reputation and maintain trust with your stakeholders, customers and lawmakers, then you need to focus on developing strong data ethics.

    Businesses that invest time in establishing proper data ethics set the right foundation to protect their reputation, develop trust with stakeholders and create goodwill and loyalty.

    3. Increased trust means greater revenue

    What happens when you establish proper data ethics ?

    You’ll gain the trust of your customers, maintain a solid reputation and increase your brand image.

    Customers who trust you to protect their privacy and data want to keep doing business with you.

    So, what’s the end result for a business that values data ethics ?

    You’ll generate more revenue in the long run. Trust is one thing you should never put on the back burner if you have plans to keep growing your business. By leaning more into data ethics, you’ll be able to build that brand reputation that helps people feel comfortable buying your products and services on repeat.

    While spending time and money on data ethics may seem like an annoyance, the reality is that it’s a business investment that will pay dividends for years to come.

    5 core data ethics principles

    So, what exactly is involved in data ethics ?

    For most people, data ethics is a pretty broad and vague term. If you’re curious about the core pillars of data ethics, then keep reading.

    Here are five core data ethical principles you need to follow to ensure you’re protecting your customers’ data and maintaining trust :

    Image displaying the 5 core data ethics principles - ownership, transparency, privacy, intention, outcomes.

    1. Data ownership

    The individual owns the data, not you. This is the first principle of data ethics. You don’t have control over someone else’s data. It’s theirs, and they have full ownership over it.

    Just as stealing a TV from an electronics store is a crime, stealing (or collecting) someone’s personal data without their consent is considered unlawful and unethical.

    Consent is the only way to ethically “own” someone’s data.

    How can you collect someone’s data ethically ?

    • Digital privacy policies
    • Signed, written agreements
    • Popups with checkboxes that allow you to track users’ behaviour

    Essentially, anytime you’re collecting data from your website or app users, you need to ensure you’re asking permission for that data.

    You should never assume a website visitor or customer is okay with you collecting your data automatically. Instead, ask permission to collect, track and use their data to avoid legal and ethical issues.

    2. Transparency

    The second core principle of data ethics within business is transparency. This means you need to be fully transparent on when, where and how you :

    • Collect data
    • Store data
    • Use data

    In other words, you need to allow your customers and website visitors to have a window inside your data activities.

    They need to be able to see exactly how you plan on using the data you’re collecting from them.

    For example, imagine you implemented a new initiative to personalise the website experience for each user based on individual behaviour. To do this, you’ll need to track cookies. In this case, you’d need to write up a new policy stating how this behavioural data is going to be collected, tracked and used.

    It’s within your website visitors’ rights to access this information so they can choose whether or not they want to accept or decline your website’s cookies.

    With any new data collection or tracking, you need to be 100% clear about how you’re going to use the data. You can’t be deceptive, misleading, or withholding any information on how you will use the data, as this is unethical and, in many cases, unlawful.

    3. Privacy

    Another important branch of ethics is privacy. The ethical implications of this should be obvious.

    When your users, visitors, or customers enter your sphere of influence and you begin collecting data on them, you are responsible for keeping that data private.

    When someone accepts the terms of your data usage, they’re not agreeing to have their data released to the public. They’re agreeing to let you leverage that data as their trusted business provider to better serve them. They expect you to maintain privacy.

    You can’t spread private information to third parties. You can’t blast this data to the public. 

    This is especially important if someone allows you to collect and use their personally identifiable information (PII), such as :

    • First and last name
    • Email address
    • Date of birth
    • Home address
    • Phone number

    To protect your audience’s data, you should only store it in a secure database. 

    Screenshot example of the Matomo dashboard

    For example, Matomo’s web analytics solution guarantees the privacy of both your users and analytics data.

    With Matomo, you have complete ownership of your data. Unlike other web analytics solutions that exploit your data for advertising purposes, Matomo users can use analytics with confidence, knowing that their data won’t be sold to advertisers.

    Learn more about data privacy with Matomo here.

    Try Matomo for Free

    Get the web insights you need, while respecting user privacy.

    No credit card required

    4. Intention

    When you collect and store data, you need to tell your users why you’re collecting their data. But there’s another principle of data ethics that goes beyond the reason you give your customers.

    Intention is the reason you give yourself for collecting and using the data.

    Before you start collecting and storing data, you should ask yourself the following :

    • Why you need it
    • What you’ll gain from it
    • What changes you’ll be able to make after you analyse the data

    If your intention is wrong in any way, it’s unethical to collect the data :

    • You’re collecting data to hurt others
    • You’re collecting data to profit from your users’ weaknesses
    • You’re collecting data for any other malicious reason

    When you collect data, you need to have the right intentions to maintain proper data ethics ; otherwise, you could harm your brand, break trust and ruin your reputation.

    5. Outcomes

    You may have the best intentions, but sometimes, there are negative outcomes from data use.

    For example, British Airways’ intention was not to allow hackers to gain access and harm their users. But the reality is that their customers’ data was stolen and used for malicious purposes. While this isn’t technically unlawful, the outcome of collecting data ended badly.

    To ensure proper data ethics, you must have good standing with your data. This means protecting your users at all costs, maintaining a good reputation and ensuring proper privacy measures are set up.

    How to implement data ethics as a business leader

    As a business leader, CTO or CEO, it’s your responsibility to implement data ethics within your organisation. Here are some tips to implement data ethics based on the size and stage of your organisation :

    Startups

    If you’re a startup, you need to be mindful of which technology and tools you use to collect, store and use data to help you grow your business.

    It can be a real challenge to juggle all the moving parts of a startup since things can change so quickly. However, it’s crucial to establish a leader and allow easy access to ethical analysis resources to maintain proper data ethics early on.

    Small and medium-sized businesses

    As you begin scaling, you’ll likely be using even more technology. With each new business technique you implement, there will be new ways you’ll be collecting user data. 

    One of the key processes involved in managing data as you grow is to hire engineers who build out different technologies. You must have protocols, best practices and management overseeing the new technologies being built to ensure proper data ethics.

    Global businesses

    Have you scaled internationally ?

    There will be even more rules, laws, regulations and organisations to answer to if you start managing data unethically.

    You should have established teams or departments to ensure you follow proper privacy and data protocols worldwide. When you have a large organisation, you have more money and vast amounts of data. This makes you a bigger target for leaks, ransomware and hackers.

    You should ensure you have cross-departmental groups working to establish ongoing protocols and training to keep your data management in good standing.

    Leverage data ethically with Matomo

    Data is powerful.

    It’s a crucial point of leverage that’s required to stay competitive.

    However, improper use and management of data can give you a bad reputation, break trust and even cause you legal trouble.

    That’s why you must maintain good data ethics within your organisation.

    One of the most important places to set up proper data ethics and privacy measures is with your website analytics.

    Matomo is the leading, privacy-friendly web analytics solution in the world. It automatically collects, stores, and tracks data across your website ethically.

    With over 1 million websites using Matomo, you get to take full control over your website performance with :

    • Accurate data (no data sampling)
    • Privacy-friendly and GDPR-compliant analytics
    • Open-source for transparency and to create a custom solution for you

    Try Matomo free for 21-days. No credit card required.

  • How to add new pages and menu items to Piwik – Introducing the Piwik Platform

    11 septembre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to create a widget). This time you’ll learn how to extend Piwik by adding new pages and menu items. For this tutorial you will need to have basic knowledge of PHP and optionally of Twig which is the template engine we use.

    What can be displayed in a page ?

    To make it short : You can display any corporate related content, key metrics, news, help pages, custom reports, contact details, information about your server, forms to manage any data and anything else.

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyControllerPlugin". There should now be a folder plugins/MyControllerPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a page

    We start by using the Piwik Console to create a new page :

    ./console generate:controller

    The command will ask you to enter the name of the plugin the controller should belong to. I will simply use the above chosen plugin name “MyControllerPlugin”. There should now be two files plugins/MyControllerPlugin/Controller.php and plugins/MyControllerPlugin/templates/index.twig which both already contain an example to get you started easily :

    Controller.php

    1. class Controller extends \Piwik\Plugin\Controller
    2. {
    3.     public function index()
    4.     {
    5.         return $this->renderTemplate('index', array(
    6.              'answerToLife' => 42
    7.         ));
    8.     }
    9. }

    Télécharger

    and templates/index.twig

    1. {% extends 'dashboard.twig' %}
    2.  
    3. {% block content %}
    4.     <strong>Hello world!</strong>
    5.     <br/>
    6.  
    7.     The answer to life is {{ answerToLife }}
    8. {% endblock %}

    Télécharger

    Note : If you are generating the Controller before Piwik 2.7.0 the example will look slightly different.

    The controller action index assigns the view variable answerToLife to the view and renders the Twig template templates/index.twig. Any variable assigned this way can then be used in the view using for example {{ answerToLife }}.

    Using a Twig template to generate the content of your page is actually optional : instead feel free to generate any content as desired and return a string in your controller action.

    As the above template index.twig is extending the dashboard template the Logo as well as the top menu will automatically appear on top of your content which is defined within the block content.

    Rendered page content

    How to display the page within the admin

    If you would like to add the admin menu on the left you have to modify the following parts :

    • Extend \Piwik\Plugin\ControllerAdmin instead of \Piwik\Plugin\Controller in the file Controller.php. In a future version of Piwik this step will be no longer neccessary, see #6151
    • Extend the template admin.twig instead of dashboard.twig
    • Define a headline using an H2-element
    1. {% extends 'admin.twig' %}
    2.  
    3. {% block content %}
    4.     <h2>Hello world!</h2>
    5.     <br/>
    6.  
    7.     The answer to life is {{ answerToLife }}
    8. {% endblock %}

    Télécharger

    Note : Often one needs to add a page to the admin to make a plugin configurable. We have a unified solution for this using the Settings API.

    Admin page

    How to display a blank page

    If you would like to generate a blank page that shows only your content the template should contain only your markup as follows :

    1. <strong>Hello world!</strong>
    2. <br/>
    3.  
    4. The answer to life is {{ answerToLife }}

    Télécharger

    Predefined variables, UI components, security and accessing query parameters

    In this blog post we only cover the basics to get you started. We highly recommend to read the MVC guide on our developer pages which covers some of those advanced topics. For instance you might be wondering how to securely access $_GET or $_POST parameters, you might want to restrict the content of your page depending on a user role, and much more.

    If you would like to know how to make use of JavaScript, CSS and Less have a look at our Working with Piwik’s UI guide.

    Note : How to include existing UI components such as a site selector or a date selector will be covered in a future blog post. Also, there are default variables assigned to the view depending on the context. A list of those variables that may or may not be defined is unfortunately not available yet but we will catch up on this.

    Let’s add a menu item to make the page accessible

    So far you have created a page but you can still not access it. Therefore we need to add a menu item to one of the Piwik menus. We start by using the Piwik Console to create a menu template :

    ./console generate:menu

    The command will ask you to enter the name of the plugin the menu should belong to. I will use again the above chosen plugin name “MyControllerPlugin”. There should now be a file plugins/MyControllerPlugin/Menu.php which contains an example to get you started easily :

    Menu.php

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         // reuse an existing category.
    6.         $menu->addManageItem('My User Item', $this->urlForAction('showList'));
    7.  
    8.         // or create a custom category
    9.         $menu->addItem('My Custom Category', 'My User Item', $this->urlForDefaultAction());
    10.     }
    11. }

    Télécharger

    This is only a part of the generated template since all the examples of the different menus are similar. You can add items to four menus :

    • configureReportingMenu To add a new item to the reporting menu which includes all the reports like “Actions” and “Visitors”.
    • configureAdminMenu To add a new item to the admin menu which includes items like “User settings” and “Websites”.
    • configureTopMenu To add a new item to the top menu which includes items like “All Websites” and “Logout”.
    • configureUserMenu To add a new item to the user menu which is accessible when clicking on the username on the top right.

    In this blog post we will add a new item to the user menu and to do so we adjust the generated template like this :

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         $menu->addManageItem('My User Item', $this->urlForAction($method = 'index'), $orderId = 30);
    6.     }
    7. }

    Télécharger

    That’s it. This will add a menu item named “My User Item” to the “Manage” section of the user menu. When a user chooses the menu item, the “index” method of your controller will be executed and your previously created page will be first rendered and then displayed. Optionally, you can define an order to influence the position of the menu item within the manage section. Following this example you can add an item to any menu for any action. I think you get the point !

    User menu

    Note : In Piwik 2.6.0 and before the above example would look like this :

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         $menu->addManageItem('My User Item', array($module = 'MyControllerPlugin', $action = 'index'), $orderId = 30);
    6.     }
    7. }

    Télécharger

    How to test a page

    After you have created your page you are surely wondering how to test it. A controller should be usually very simple as it is only the connector between model and view. Therefore, we do usually not create unit or integration test for controllers and for the view less than ever. Instead we would create a UI test that takes a screenshot of your page and compares it with an expected screenshot. Luckily, there is already a section UI tests in our Automated tests guide.

    Publishing your Plugin on the Marketplace

    In case you want to share your page with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin.

    Advanced features

    Isn’t it easy to create a page ? We never even created a file ! Of course, based on our API design principle “The complexity of our API should never exceed the complexity of your use case.” you can accomplish more if you want : You can make use of Vanilla JavaScript, jQuery, AngularJS, Less and CSS, you can reuse UI components, you can access query parameters and much more.

    Would you like to know more about this ? Go to our MVC (Model-View-Controller) and Working with Piwik’s UI guides in the Piwik Developer Zone.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • How to add new pages and menu items to Piwik – Introducing the Piwik Platform

    11 septembre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to create a widget). This time you’ll learn how to extend Piwik by adding new pages and menu items. For this tutorial you will need to have basic knowledge of PHP and optionally of Twig which is the template engine we use.

    What can be displayed in a page ?

    To make it short : You can display any corporate related content, key metrics, news, help pages, custom reports, contact details, information about your server, forms to manage any data and anything else.

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyControllerPlugin". There should now be a folder plugins/MyControllerPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a page

    We start by using the Piwik Console to create a new page :

    ./console generate:controller

    The command will ask you to enter the name of the plugin the controller should belong to. I will simply use the above chosen plugin name “MyControllerPlugin”. There should now be two files plugins/MyControllerPlugin/Controller.php and plugins/MyControllerPlugin/templates/index.twig which both already contain an example to get you started easily :

    Controller.php

    1. class Controller extends \Piwik\Plugin\Controller
    2. {
    3.     public function index()
    4.     {
    5.         return $this->renderTemplate('index', array(
    6.              'answerToLife' => 42
    7.         ));
    8.     }
    9. }

    Télécharger

    and templates/index.twig

    1. {% extends 'dashboard.twig' %}
    2.  
    3. {% block content %}
    4.     <strong>Hello world!</strong>
    5.     <br/>
    6.  
    7.     The answer to life is {{ answerToLife }}
    8. {% endblock %}

    Télécharger

    Note : If you are generating the Controller before Piwik 2.7.0 the example will look slightly different.

    The controller action index assigns the view variable answerToLife to the view and renders the Twig template templates/index.twig. Any variable assigned this way can then be used in the view using for example {{ answerToLife }}.

    Using a Twig template to generate the content of your page is actually optional : instead feel free to generate any content as desired and return a string in your controller action.

    As the above template index.twig is extending the dashboard template the Logo as well as the top menu will automatically appear on top of your content which is defined within the block content.

    Rendered page content

    How to display the page within the admin

    If you would like to add the admin menu on the left you have to modify the following parts :

    • Extend \Piwik\Plugin\ControllerAdmin instead of \Piwik\Plugin\Controller in the file Controller.php. In a future version of Piwik this step will be no longer neccessary, see #6151
    • Extend the template admin.twig instead of dashboard.twig
    • Define a headline using an H2-element
    1. {% extends 'admin.twig' %}
    2.  
    3. {% block content %}
    4.     <h2>Hello world!</h2>
    5.     <br/>
    6.  
    7.     The answer to life is {{ answerToLife }}
    8. {% endblock %}

    Télécharger

    Note : Often one needs to add a page to the admin to make a plugin configurable. We have a unified solution for this using the Settings API.

    Admin page

    How to display a blank page

    If you would like to generate a blank page that shows only your content the template should contain only your markup as follows :

    1. <strong>Hello world!</strong>
    2. <br/>
    3.  
    4. The answer to life is {{ answerToLife }}

    Télécharger

    Predefined variables, UI components, security and accessing query parameters

    In this blog post we only cover the basics to get you started. We highly recommend to read the MVC guide on our developer pages which covers some of those advanced topics. For instance you might be wondering how to securely access $_GET or $_POST parameters, you might want to restrict the content of your page depending on a user role, and much more.

    If you would like to know how to make use of JavaScript, CSS and Less have a look at our Working with Piwik’s UI guide.

    Note : How to include existing UI components such as a site selector or a date selector will be covered in a future blog post. Also, there are default variables assigned to the view depending on the context. A list of those variables that may or may not be defined is unfortunately not available yet but we will catch up on this.

    Let’s add a menu item to make the page accessible

    So far you have created a page but you can still not access it. Therefore we need to add a menu item to one of the Piwik menus. We start by using the Piwik Console to create a menu template :

    ./console generate:menu

    The command will ask you to enter the name of the plugin the menu should belong to. I will use again the above chosen plugin name “MyControllerPlugin”. There should now be a file plugins/MyControllerPlugin/Menu.php which contains an example to get you started easily :

    Menu.php

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         // reuse an existing category.
    6.         $menu->addManageItem('My User Item', $this->urlForAction('showList'));
    7.  
    8.         // or create a custom category
    9.         $menu->addItem('My Custom Category', 'My User Item', $this->urlForDefaultAction());
    10.     }
    11. }

    Télécharger

    This is only a part of the generated template since all the examples of the different menus are similar. You can add items to four menus :

    • configureReportingMenu To add a new item to the reporting menu which includes all the reports like “Actions” and “Visitors”.
    • configureAdminMenu To add a new item to the admin menu which includes items like “User settings” and “Websites”.
    • configureTopMenu To add a new item to the top menu which includes items like “All Websites” and “Logout”.
    • configureUserMenu To add a new item to the user menu which is accessible when clicking on the username on the top right.

    In this blog post we will add a new item to the user menu and to do so we adjust the generated template like this :

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         $menu->addManageItem('My User Item', $this->urlForAction($method = 'index'), $orderId = 30);
    6.     }
    7. }

    Télécharger

    That’s it. This will add a menu item named “My User Item” to the “Manage” section of the user menu. When a user chooses the menu item, the “index” method of your controller will be executed and your previously created page will be first rendered and then displayed. Optionally, you can define an order to influence the position of the menu item within the manage section. Following this example you can add an item to any menu for any action. I think you get the point !

    User menu

    Note : In Piwik 2.6.0 and before the above example would look like this :

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         $menu->addManageItem('My User Item', array($module = 'MyControllerPlugin', $action = 'index'), $orderId = 30);
    6.     }
    7. }

    Télécharger

    How to test a page

    After you have created your page you are surely wondering how to test it. A controller should be usually very simple as it is only the connector between model and view. Therefore, we do usually not create unit or integration test for controllers and for the view less than ever. Instead we would create a UI test that takes a screenshot of your page and compares it with an expected screenshot. Luckily, there is already a section UI tests in our Automated tests guide.

    Publishing your Plugin on the Marketplace

    In case you want to share your page with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin.

    Advanced features

    Isn’t it easy to create a page ? We never even created a file ! Of course, based on our API design principle “The complexity of our API should never exceed the complexity of your use case.” you can accomplish more if you want : You can make use of Vanilla JavaScript, jQuery, AngularJS, Less and CSS, you can reuse UI components, you can access query parameters and much more.

    Would you like to know more about this ? Go to our MVC (Model-View-Controller) and Working with Piwik’s UI guides in the Piwik Developer Zone.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.