
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (31)
-
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (5999)
-
How Media Analytics for Piwik gives you the insights you need to measure how effective your video and audio marketing is – Part 1
31 janvier 2017, par InnoCraft — CommunityDo you have video or audio content on your website or in your app ? If you answered this with yes, you should continue reading and learn everything about our Media Analytics premium feature.
When you produce video or audio content, you are either spending money or time or often both money and time on your content in the hope of increasing conversions or sales. This means you have to know how your media is being used, when it is used, for how long and by whom. You can simply not afford not to know how this content affects your overall business goals as you are likely losing money and time by not making the most out of it. Would you be able to answer any of the above questions ? Do you know whether you can justify the cost and time for producing them, which videos work better than others and how they support your marketing strategy ? Luckily, getting all these insights is now so trivial it is almost a crime to not measure it.
Getting Media Analytics and Installation
Media Analytics can be purchased from the Piwik Marketplace where you find all sorts of free plugins as well as several premium features such as A/B Testing or Funnel. After the purchase you will receive a license key that you can enter in your Piwik to install and update the plugin with just one click.
The feature will in most cases automatically start tracking your media content and you don’t even need to change the tracking code on your website. Currently supported players are for example YouTube, Vimeo, HTML 5, JW Player, VideoJS and many more players. You can also easily extend it by adding a custom media player or simply by letting us know which player you use and we will add support for it for you.
By activating this feature, you get more than 15 new media reports, even more exportable widgets, new segments, APIs, and more. We will cover some of those features in this blog post and in part 2. For a full list of features check out the Media Analytics page on the Piwik Marketplace.
Media Overview
As the name says, it gives you an overview over your media usage and how it performs over time. You can choose any media metrics in the big evolution graph and the sparklines below give you an overview over all important metrics in a glance.
It lets you for example see how often media was shown to your users, how often users start playing your media, for how long they watched it, how often they finished it, and more. If you see some spikes there, you should definitely have a deeper look at the other reports. When you hover a metric, it will show you a tooltip explaining how the data for this is collected and what it means.
Real-Time Media
On the Real-Time page you can see how your content is being used by your visitors right now, for example within the last 30 minutes, last 60 minutes and last 24 hours.
It shows you how many plays you had in the last minutes, for how long they played it, and it shows you currently most popular media titles. This is great to discover which media content performs best right now and lets you make decisions based on user behaviour that is happening right now.
Below you can see our Audience Real-Time Map that shows you from where in the world your media is being played. A bigger circle indicates that a media play happened more recently and of course you can zoom in down to countries and regions.
All the reports update every few seconds so you can always have a look at it and see in just a second how your content is doing and how certain marketing campaigns affect it. All these real-time reports can be also added as widgets to any of your Piwik Dashboards and they can be exported for example as an iframe.
Video, Audio and Media Player reports
Those reports come with so many features, we need a separate blog post and cover this in part 2.
Events
Media Analytics will automatically track events so you can see how often users pressed for example play or pause, how often they resumed a video and how often they finished a video. This helps you better understand how your media is being used.
For example in the past we noticed a couple of videos with lots of pause and resume events. We then had a look at the Audience Log – which we will cover next – to better understand why visitors paused the videos so often. We then realized they did this especially for videos that were served from a specific server and because the videos were loading so slow, users often pressed pause to let the media buffer, then played the media for a few seconds and then paused it again as they had to wait for the video to load. Moving those videos to another, faster server showed us immediate results in the number of pauses going down and on average visitors watched the videos for much longer.
Audience Log
At InnoCraft, we understand that not only aggregated metrics matter but also that you often need the ability to dig into your data and “debug” certain behaviours to understand the cause for some unusual high or low metrics. For example you may find out that many of your users often pause a video, then you wonder how each individual user behaved so you can better understand the why.
The audience log shows you a detailed log of every visitor. You can chronologically see every action a visitor has performed during their whole visit. If you click on the visitor profile link, you can even see all visits of a specific visitor, and all actions they have ever performed on your website.
This lets you ultimately debug and understand your visitors and see exactly which actions they performed before playing your media, which media they played, how they played your media, and how they behaved after playing your media.
The visitor log of course also shows important information about each visitor like where they came from (referrer), their location, software, device and much more information.
Audience Map
The Audience Map is similar to the Real-Time Map but it shows you the locations of your visitors based on a selected date range and not in real time. The darker the blue, the more visitors from that country, region or city have interacted with your media.
Coming in part 2
In the next part we will cover which video, audio and media player reports Media Analytics provides, how segmenting gives you insights into different personas, and how nicely it integrates into Piwik.
How to get Media Analytics and related features
You can get Media Analytics on the Piwik Marketplace. If you want to learn more about this feature, you might be also interested in the Media Analytics User Guide and the Media Analytics FAQ.
-
How to expose new API methods in the HTTP Reporting API – Introducing the Piwik Platform
26 février 2015, par Thomas Steur — DevelopmentThis is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to write UI tests for your plugin). This time you’ll learn how to extend our Reporting API. For this tutorial you will need to have basic knowledge of PHP.
What is Piwik’s Reporting API ?
It allows third party applications to access analytics data and manipulate miscellaneous data (such as users or websites) through HTTP requests.
What is it good for ?
The Reporting API is used by the Piwik UI to render reports, to manage users, and more. If you want to add a feature to the Piwik UI, you might have to expose a method in the API to access this data. As the API is called via HTTP it allows you to fetch or manipulate any Piwik related data from anywhere. In these exposed API methods you can do pretty much anything you want, for example :
- Enhance existing reports with additional data
- Filter existing reports based on custom rules
- Access the database and generate custom reports
- Persist and read any data
- Request server information
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
. - Generate a plugin :
./console generate:plugin --name="MyApiPlugin"
. There should now be a folderplugins/MyApiPlugin
. - And activate the created plugin :
./console plugin:activate "MyApiPlugin"
Let’s start creating an API
We start by using the Piwik Console to create a new API :
./console generate:api
The command will ask you to enter the name of the plugin the created API should belong to. I will simply use the above chosen plugin name “MyApiPlugin”. There should now be a file
plugins/MyApiPlugin/API.php
which contains already an example to get you started easily :- class API extends \Piwik\Plugin\API
- {
- public function getAnswerToLife($truth = true)
- {
- if ($truth) {
- return 42;
- }
- return 24;
- }
- public function getExampleReport($idSite, $period, $date, $wonderful = false)
- {
- ));
- return $table;
- }
- }
Any public method in that file will be available via the Reporting API. For example the method
getAnswerToLife
can be called via this URL :index.php?module=API&method=MyApiPlugin.getAnswerToLife
. The URL parametermethod
is a combination of your plugin name and the method name within this class.Passing parameters to your method
Both example methods define some parameters. To pass any value to a parameter of your method simply specify them by name in the URL. For example
...&method=MyApiPlugin.getExampleReport&idSite=1&period=week&date=today&wonderful=1
to pass values to the parameters of the methodgetExampleReport
.Returning a value
In an API method you can return any boolean, number, string or array value. A resource or an object cannot be returned unless it implements the DataTableInterface such as DataTable (the primary data structure used to store analytics data in Piwik), DataTable\Map (stores a set of DataTables) and DataTable\Simple (a DataTable where every row has two columns : label and value).
Did you know ? You can choose the response format of your API request by appending a parameter
&format=JSON|XML|CSV|...
to the URL. Check out the Reporting API Reference for more information.Best practices
Check user permissions
Do not forget to check whether a user actually has permissions to access data or to perform an action. If you’re not familiar with Piwik’s permissions and how to check them read our User Permission guide.
Keep API methods small
At Piwik we aim to write clean code. Therefore, we recommend to keep API methods small (separation of concerns). An API pretty much acts like a Controller :
- public function createLdapUser($idSite, $login, $password)
- {
- Piwik::checkUserHasAdminAccess($idSite);
- $this->checkLogin($login);
- $this->checkPassword($password);
- $myModel = new LdapModel();
- $success = $myModel->createUser($idSite, $login, $password);
- return $success;
- }
This is not only easy to read, it will also allow you to create simple tests for
LdapModel
(without having to bootstrap the whole Piwik layer) and you will be able to reuse it in other places if needed.Calling APIs of other plugins
For example if you want to fetch an existing report from another plugin, say a list of all Page URLs, do not request this report by calling that method directly :
\Piwik\Plugins\Actions\API::getInstance()->getPageUrls($idSite, $period, $date);
. Instead, issue a new API request :
$report = \Piwik\API\Request::processRequest('Actions.getPageUrls', array(
'idSite' => $idSite,
'period' => $period,
'date' => $date,
));This has several advantages :
- It avoids a fatal error if the requested plugin is not available on a Piwik installation
- Other plugins can extend the called API method via events (adding additional report data to a report, doing additional permission checks) but those events will be only triggered when requesting the report as suggested
- If the method parameters change, your request will most likely still work
Publishing your Plugin on the Marketplace
In case you want to share your API 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 and best practices when publishing a plugin.
Isn’t it easy to create a API ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.
-
How to expose new API methods in the HTTP Reporting API – Introducing the Piwik Platform
26 février 2015, par Thomas Steur — DevelopmentThis is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to write UI tests for your plugin). This time you’ll learn how to extend our Reporting API. For this tutorial you will need to have basic knowledge of PHP.
What is Piwik’s Reporting API ?
It allows third party applications to access analytics data and manipulate miscellaneous data (such as users or websites) through HTTP requests.
What is it good for ?
The Reporting API is used by the Piwik UI to render reports, to manage users, and more. If you want to add a feature to the Piwik UI, you might have to expose a method in the API to access this data. As the API is called via HTTP it allows you to fetch or manipulate any Piwik related data from anywhere. In these exposed API methods you can do pretty much anything you want, for example :
- Enhance existing reports with additional data
- Filter existing reports based on custom rules
- Access the database and generate custom reports
- Persist and read any data
- Request server information
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
. - Generate a plugin :
./console generate:plugin --name="MyApiPlugin"
. There should now be a folderplugins/MyApiPlugin
. - And activate the created plugin :
./console plugin:activate "MyApiPlugin"
Let’s start creating an API
We start by using the Piwik Console to create a new API :
./console generate:api
The command will ask you to enter the name of the plugin the created API should belong to. I will simply use the above chosen plugin name “MyApiPlugin”. There should now be a file
plugins/MyApiPlugin/API.php
which contains already an example to get you started easily :- class API extends \Piwik\Plugin\API
- {
- public function getAnswerToLife($truth = true)
- {
- if ($truth) {
- return 42;
- }
- return 24;
- }
- public function getExampleReport($idSite, $period, $date, $wonderful = false)
- {
- ));
- return $table;
- }
- }
Any public method in that file will be available via the Reporting API. For example the method
getAnswerToLife
can be called via this URL :index.php?module=API&method=MyApiPlugin.getAnswerToLife
. The URL parametermethod
is a combination of your plugin name and the method name within this class.Passing parameters to your method
Both example methods define some parameters. To pass any value to a parameter of your method simply specify them by name in the URL. For example
...&method=MyApiPlugin.getExampleReport&idSite=1&period=week&date=today&wonderful=1
to pass values to the parameters of the methodgetExampleReport
.Returning a value
In an API method you can return any boolean, number, string or array value. A resource or an object cannot be returned unless it implements the DataTableInterface such as DataTable (the primary data structure used to store analytics data in Piwik), DataTable\Map (stores a set of DataTables) and DataTable\Simple (a DataTable where every row has two columns : label and value).
Did you know ? You can choose the response format of your API request by appending a parameter
&format=JSON|XML|CSV|...
to the URL. Check out the Reporting API Reference for more information.Best practices
Check user permissions
Do not forget to check whether a user actually has permissions to access data or to perform an action. If you’re not familiar with Piwik’s permissions and how to check them read our User Permission guide.
Keep API methods small
At Piwik we aim to write clean code. Therefore, we recommend to keep API methods small (separation of concerns). An API pretty much acts like a Controller :
- public function createLdapUser($idSite, $login, $password)
- {
- Piwik::checkUserHasAdminAccess($idSite);
- $this->checkLogin($login);
- $this->checkPassword($password);
- $myModel = new LdapModel();
- $success = $myModel->createUser($idSite, $login, $password);
- return $success;
- }
This is not only easy to read, it will also allow you to create simple tests for
LdapModel
(without having to bootstrap the whole Piwik layer) and you will be able to reuse it in other places if needed.Calling APIs of other plugins
For example if you want to fetch an existing report from another plugin, say a list of all Page URLs, do not request this report by calling that method directly :
\Piwik\Plugins\Actions\API::getInstance()->getPageUrls($idSite, $period, $date);
. Instead, issue a new API request :
$report = \Piwik\API\Request::processRequest('Actions.getPageUrls', array(
'idSite' => $idSite,
'period' => $period,
'date' => $date,
));This has several advantages :
- It avoids a fatal error if the requested plugin is not available on a Piwik installation
- Other plugins can extend the called API method via events (adding additional report data to a report, doing additional permission checks) but those events will be only triggered when requesting the report as suggested
- If the method parameters change, your request will most likely still work
Publishing your Plugin on the Marketplace
In case you want to share your API 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 and best practices when publishing a plugin.
Isn’t it easy to create a API ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.