Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
c364edf9
Valider
c364edf9
rédigé
8 years ago
par
Thomas Steur
Validation de
GitHub
8 years ago
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
added goals event as it is needed for custom dimensions (#10493)
parent
7a37d48c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
CHANGELOG.md
+0
-1
0 ajout, 1 suppression
CHANGELOG.md
plugins/Goals/Goals.php
+43
-16
43 ajouts, 16 suppressions
plugins/Goals/Goals.php
plugins/Goals/Pages.php
+3
-0
3 ajouts, 0 suppression
plugins/Goals/Pages.php
avec
46 ajouts
et
17 suppressions
CHANGELOG.md
+
0
−
1
Voir le fichier @
c364edf9
...
...
@@ -61,7 +61,6 @@ The Product Changelog at **[piwik.org/changelog](http://piwik.org/changelog)** l
*
`Menu.Top.addItems`
*
`ViewDataTable.addViewDataTable`
Create a
[
Visualization
](
http://developer.piwik.org/guides/visualizing-report-data
)
instead
*
`ViewDataTable.getDefaultType`
Specify the default type in a
[
Report
](
http://developer.piwik.org/guides/custom-reports
)
instead
*
`Goals.getReportsWithGoalMetrics`
Specify a report has goal metrics in a
[
Report
](
http://developer.piwik.org/guides/custom-reports
)
instead
*
`Login.authenticate`
Create a custom SessionInitializer instead of using
`Login`
events
*
`Login.initSession.end`
*
`Login.authenticate.successful`
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
plugins/Goals/Goals.php
+
43
−
16
Voir le fichier @
c364edf9
...
...
@@ -8,9 +8,7 @@
*/
namespace
Piwik\Plugins\Goals
;
use
Piwik\ArchiveProcessor
;
use
Piwik\Common
;
use
Piwik\Db
;
use
Piwik\Piwik
;
use
Piwik\Plugin\ReportsProvider
;
use
Piwik\Tracker\GoalManager
;
...
...
@@ -198,21 +196,50 @@ class Goals extends \Piwik\Plugin
}
}
$reportWithGoalMetrics
=
array
(
array
(
'category'
=>
'General_Visit'
,
'name'
=>
Piwik
::
translate
(
'Goals_VisitsUntilConv'
),
'module'
=>
'Goals'
,
'action'
=>
'getVisitsUntilConversion'
,
'viewDataTable'
=>
'table'
,
),
array
(
'category'
=>
'General_Visit'
,
'name'
=>
Piwik
::
translate
(
'Goals_DaysToConv'
),
'module'
=>
'Goals'
,
'action'
=>
'getDaysToConversion'
,
'viewDataTable'
=>
'table'
,
)
$reportsWithGoals
[]
=
array
(
'category'
=>
'General_Visit'
,
'name'
=>
Piwik
::
translate
(
'Goals_VisitsUntilConv'
),
'module'
=>
'Goals'
,
'action'
=>
'getVisitsUntilConversion'
,
'viewDataTable'
=>
'table'
,
);
$reportsWithGoals
=
array_merge
(
$reportsWithGoals
,
$reportWithGoalMetrics
);
$reportsWithGoals
[]
=
array
(
'category'
=>
'General_Visit'
,
'name'
=>
Piwik
::
translate
(
'Goals_DaysToConv'
),
'module'
=>
'Goals'
,
'action'
=>
'getDaysToConversion'
,
'viewDataTable'
=>
'table'
,
);
/**
* Triggered when gathering all reports that contain Goal metrics. The list of reports
* will be displayed on the left column of the bottom of every _Goals_ page.
*
* If plugins define reports that contain goal metrics (such as **conversions** or **revenue**),
* they can use this event to make sure their reports can be viewed on Goals pages.
*
* **Example**
*
* public function getReportsWithGoalMetrics(&$reports)
* {
* $reports[] = array(
* 'category' => Piwik::translate('MyPlugin_myReportCategory'),
* 'name' => Piwik::translate('MyPlugin_myReportDimension'),
* 'module' => 'MyPlugin',
* 'action' => 'getMyReport'
* );
* }
*
* @param array &$reportsWithGoals The list of arrays describing reports that have Goal metrics.
* Each element of this array must be an array with the following
* properties:
*
* - **category**: The report category. This should be a translated string.
* - **name**: The report's translated name.
* - **module**: The plugin the report is in, eg, `'UserCountry'`.
* - **action**: The API method of the report, eg, `'getCountry'`.
* @ignore
* @deprecated since 2.5.0
*/
Piwik
::
postEvent
(
'Goals.getReportsWithGoalMetrics'
,
array
(
&
$reportsWithGoals
));
return
$reportsWithGoals
;
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
plugins/Goals/Pages.php
+
3
−
0
Voir le fichier @
c364edf9
...
...
@@ -296,6 +296,9 @@ class Pages
}
$widget
=
$this
->
createWidgetForReport
(
$report
[
'module'
],
$report
[
'action'
]);
if
(
!
empty
(
$report
[
'name'
]))
{
$widget
->
setName
(
$report
[
'name'
]);
}
$widget
->
setParameters
(
$params
);
$widget
->
setCategoryId
(
$categoryText
);
$widget
->
setSubcategoryId
(
$categoryText
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter