diff --git a/lang/en.php b/lang/en.php index 5dba638c59f306b39582b6c485cc42e731866eca..524ecf4b2113a1c3b3e23543b757fbf0e657c66a 100644 --- a/lang/en.php +++ b/lang/en.php @@ -502,10 +502,12 @@ $translations = array( 'CoreUpdater_ExceptionArchiveIncomplete' => 'Archive is incomplete: some files are missing (eg. %s).', 'CustomVariables_PluginDescription' => 'Custom Variables are name,value pairs that you can set to a Visit using the Javascript API setVisitCustomVariables() function. Piwik will then report how many visits, pages, conversions for each of these custom names and values.', 'CustomVariables_CustomVariables' => 'Custom Variables', - 'CustomVariables_ColumnCustomVariableName' => 'Custom Variable name (scope visit)', - 'CustomVariables_ColumnCustomVariableValue' => 'Custom Variable value (scope visit)', - 'CustomVariables_ColumnCustomVariablePageName' => 'Custom Variable name (scope page)', - 'CustomVariables_ColumnCustomVariablePageValue' => 'Custom Variable value (scope page)', + 'CustomVariables_ColumnCustomVariableName' => 'Custom Variable name', + 'CustomVariables_ColumnCustomVariableValue' => 'Custom Variable value', + 'CustomVariables_ColumnCustomVariablePageName' => 'Custom Variable name', + 'CustomVariables_ColumnCustomVariablePageValue' => 'Custom Variable value', + 'CustomVariables_ScopeVisit' => 'scope visit', + 'CustomVariables_ScopePage' => 'scope page', 'CustomVariables_CustomVariablesReportDocumentation' => 'This report contains information about your Custom Variables. Click on a variable name to see the distribution of the values. %s For more information about Custom Variables in general, read the %sCustom Variables documentation on piwik.org%s', 'Dashboard_PluginDescription' => 'Your Web Analytics Dashboard. You can customize Your Dashboard: add new widgets, change the order of your widgets. Each user can access his own custom Dashboard.', 'Dashboard_Dashboard' => 'Dashboard', diff --git a/plugins/CustomVariables/CustomVariables.php b/plugins/CustomVariables/CustomVariables.php index 0222652e3e2775519a633b92f18eface08c07310..784bba701e9ac932c9e6f2a6c1fbea2f344ba01d 100644 --- a/plugins/CustomVariables/CustomVariables.php +++ b/plugins/CustomVariables/CustomVariables.php @@ -80,28 +80,32 @@ class Piwik_CustomVariables extends Piwik_Plugin $segments[] = array( 'type' => 'dimension', 'category' => 'CustomVariables_CustomVariables', - 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariableName').' '.$i, + 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariableName').' '.$i + .' ('.Piwik_Translate('CustomVariables_ScopeVisit').')', 'segment' => 'customVariableName'.$i, 'sqlSegment' => 'log_visit.custom_var_k'.$i, ); $segments[] = array( 'type' => 'dimension', 'category' => 'CustomVariables_CustomVariables', - 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariableValue').' '.$i, + 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariableValue').' '.$i + .' ('.Piwik_Translate('CustomVariables_ScopeVisit').')', 'segment' => 'customVariableValue'.$i, 'sqlSegment' => 'log_visit.custom_var_v'.$i, ); $segments[] = array( 'type' => 'dimension', 'category' => 'CustomVariables_CustomVariables', - 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariablePageName').' '.$i, + 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariableName').' '.$i + .' ('.Piwik_Translate('CustomVariables_ScopePage').')', 'segment' => 'customVariablePageName'.$i, 'sqlSegment' => 'log_link_visit_action.custom_var_k'.$i, ); $segments[] = array( 'type' => 'dimension', 'category' => 'CustomVariables_CustomVariables', - 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariablePageValue').' '.$i, + 'name' => Piwik_Translate('CustomVariables_ColumnCustomVariableValue').' '.$i + .' ('.Piwik_Translate('CustomVariables_ScopePage').')', 'segment' => 'customVariablePageValue'.$i, 'sqlSegment' => 'log_link_visit_action.custom_var_v'.$i, ); diff --git a/tests/integration/expected/test_apiGetReportMetadata__API.getReportMetadata.xml b/tests/integration/expected/test_apiGetReportMetadata__API.getReportMetadata.xml index 88a79a10e82c53fcf60fdd25445ed72d189a2bd7..2356af5e84593fc4f293d56bfe2f274d52c515f4 100644 --- a/tests/integration/expected/test_apiGetReportMetadata__API.getReportMetadata.xml +++ b/tests/integration/expected/test_apiGetReportMetadata__API.getReportMetadata.xml @@ -691,7 +691,7 @@ <name>Custom Variables</name> <module>CustomVariables</module> <action>getCustomVariables</action> - <dimension>Custom Variable name (scope visit)</dimension> + <dimension>Custom Variable name</dimension> <documentation>This report contains information about your Custom Variables. Click on a variable name to see the distribution of the values. <br /> For more information about Custom Variables in general, read the <a href="http://piwik.org/docs/custom-variables/" target="_blank">Custom Variables documentation on piwik.org</a></documentation> <metrics> <nb_visits>Visits</nb_visits> diff --git a/tests/integration/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml b/tests/integration/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml index 7a114d3c2b17cabce4148042537ff40c6e106701..443acaec23ada0622ad9684e0832ff3135bbb611 100644 --- a/tests/integration/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml +++ b/tests/integration/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml @@ -172,121 +172,121 @@ <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope page) 1</name> + <name>Custom Variable name 1 (scope page)</name> <segment>customVariablePageName1</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope page) 2</name> - <segment>customVariablePageName2</segment> + <name>Custom Variable name 1 (scope visit)</name> + <segment>customVariableName1</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope page) 3</name> - <segment>customVariablePageName3</segment> + <name>Custom Variable name 2 (scope page)</name> + <segment>customVariablePageName2</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope page) 4</name> - <segment>customVariablePageName4</segment> + <name>Custom Variable name 2 (scope visit)</name> + <segment>customVariableName2</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope page) 5</name> - <segment>customVariablePageName5</segment> + <name>Custom Variable name 3 (scope page)</name> + <segment>customVariablePageName3</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope visit) 1</name> - <segment>customVariableName1</segment> + <name>Custom Variable name 3 (scope visit)</name> + <segment>customVariableName3</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope visit) 2</name> - <segment>customVariableName2</segment> + <name>Custom Variable name 4 (scope page)</name> + <segment>customVariablePageName4</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope visit) 3</name> - <segment>customVariableName3</segment> + <name>Custom Variable name 4 (scope visit)</name> + <segment>customVariableName4</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope visit) 4</name> - <segment>customVariableName4</segment> + <name>Custom Variable name 5 (scope page)</name> + <segment>customVariablePageName5</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable name (scope visit) 5</name> + <name>Custom Variable name 5 (scope visit)</name> <segment>customVariableName5</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope page) 1</name> + <name>Custom Variable value 1 (scope page)</name> <segment>customVariablePageValue1</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope page) 2</name> - <segment>customVariablePageValue2</segment> + <name>Custom Variable value 1 (scope visit)</name> + <segment>customVariableValue1</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope page) 3</name> - <segment>customVariablePageValue3</segment> + <name>Custom Variable value 2 (scope page)</name> + <segment>customVariablePageValue2</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope page) 4</name> - <segment>customVariablePageValue4</segment> + <name>Custom Variable value 2 (scope visit)</name> + <segment>customVariableValue2</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope page) 5</name> - <segment>customVariablePageValue5</segment> + <name>Custom Variable value 3 (scope page)</name> + <segment>customVariablePageValue3</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope visit) 1</name> - <segment>customVariableValue1</segment> + <name>Custom Variable value 3 (scope visit)</name> + <segment>customVariableValue3</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope visit) 2</name> - <segment>customVariableValue2</segment> + <name>Custom Variable value 4 (scope page)</name> + <segment>customVariablePageValue4</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope visit) 3</name> - <segment>customVariableValue3</segment> + <name>Custom Variable value 4 (scope visit)</name> + <segment>customVariableValue4</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope visit) 4</name> - <segment>customVariableValue4</segment> + <name>Custom Variable value 5 (scope page)</name> + <segment>customVariablePageValue5</segment> </row> <row> <type>dimension</type> <category>Custom Variables</category> - <name>Custom Variable value (scope visit) 5</name> + <name>Custom Variable value 5 (scope visit)</name> <segment>customVariableValue5</segment> </row> <row> diff --git a/tests/integration/expected/test_apiGetReportMetadata_year__API.getReportMetadata.xml b/tests/integration/expected/test_apiGetReportMetadata_year__API.getReportMetadata.xml index c149d387f47139d5ea4ce199cc24fb3643b3bcb9..040f1806c9147248c14b60772d98dd6b420ec86a 100644 --- a/tests/integration/expected/test_apiGetReportMetadata_year__API.getReportMetadata.xml +++ b/tests/integration/expected/test_apiGetReportMetadata_year__API.getReportMetadata.xml @@ -533,7 +533,7 @@ <name>Custom Variables</name> <module>CustomVariables</module> <action>getCustomVariables</action> - <dimension>Custom Variable name (scope visit)</dimension> + <dimension>Custom Variable name</dimension> <documentation>This report contains information about your Custom Variables. Click on a variable name to see the distribution of the values. <br /> For more information about Custom Variables in general, read the <a href="http://piwik.org/docs/custom-variables/" target="_blank">Custom Variables documentation on piwik.org</a></documentation> <metrics> <nb_visits>Visits</nb_visits>