diff --git a/plugins/CustomVariables/API.php b/plugins/CustomVariables/API.php
index 36d4e1ff9ad50655cf616d396ad3313738462902..fa3a99dbca344ff8501d26ee8f185f245d8bd760 100644
--- a/plugins/CustomVariables/API.php
+++ b/plugins/CustomVariables/API.php
@@ -73,6 +73,8 @@ class API extends \Piwik\Plugin\API
 
         if ($flat) {
             $dataTable->filterSubtables('Piwik\Plugins\CustomVariables\DataTable\Filter\CustomVariablesValuesFromNameId');
+        } else {
+            $dataTable->filter('AddSegmentByLabel', array('customVariableName'));
         }
 
         return $dataTable;
diff --git a/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml b/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
index 1ecaf61b0850c5d6eb0fb7f0a922fe984f41789d..3a5683bdc6c66a5692119aa7ca7d025d3c797a16 100644
--- a/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
+++ b/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
@@ -3,6 +3,7 @@
 	<row>
 		<label>Name_PAGE_1</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_1</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE1</label>
@@ -14,6 +15,7 @@
 	<row>
 		<label>Name_PAGE_2</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_2</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE2</label>
@@ -25,6 +27,7 @@
 	<row>
 		<label>Name_PAGE_3</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_3</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE3</label>
@@ -36,6 +39,7 @@
 	<row>
 		<label>Name_PAGE_4</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_4</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE4</label>
@@ -47,6 +51,7 @@
 	<row>
 		<label>Name_PAGE_5</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_5</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE5</label>
@@ -58,6 +63,7 @@
 	<row>
 		<label>Name_PAGE_6</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_6</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE6</label>
@@ -69,6 +75,7 @@
 	<row>
 		<label>Name_PAGE_7</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_7</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE7</label>
@@ -80,6 +87,7 @@
 	<row>
 		<label>Name_PAGE_8</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Name_PAGE_8</segment>
 		<subtable>
 			<row>
 				<label>Val_PAGE8</label>
@@ -105,6 +113,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_1</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT1</label>
@@ -143,6 +152,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_2</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT2</label>
@@ -181,6 +191,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_3</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT3</label>
@@ -219,6 +230,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_4</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT4</label>
@@ -257,6 +269,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_5</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT5</label>
@@ -295,6 +308,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_6</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT6</label>
@@ -333,6 +347,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_7</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT7</label>
@@ -371,6 +386,7 @@
 		</goals>
 		<nb_conversions>1</nb_conversions>
 		<revenue>0</revenue>
+		<segment>customVariableName==Name_VISIT_8</segment>
 		<subtable>
 			<row>
 				<label>Val_VISIT8</label>
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml
index d24c6ab527bf9a42f15737f556854c67faeb4aae..dc1a11ab2b33c15ead98f4153fd905c4979ed660 100644
--- a/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml
+++ b/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml
@@ -3,6 +3,7 @@
 	<row>
 		<label>HTTP-code</label>
 		<nb_actions>43</nb_actions>
+		<segment>customVariableName==HTTP-code</segment>
 		<subtable>
 			<row>
 				<label>200</label>
@@ -60,6 +61,7 @@
 		<revenue>25</revenue>
 		<sum_daily_nb_uniq_visitors>7</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Not-Bot</segment>
 		<subtable>
 			<row>
 				<label>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24</label>
@@ -149,6 +151,7 @@
 		<revenue>10</revenue>
 		<sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>1</sum_daily_nb_users>
+		<segment>customVariableName==User+Name</segment>
 		<subtable>
 			<row>
 				<label>user1</label>
@@ -193,6 +196,7 @@
 	<row>
 		<label>Generation Time</label>
 		<nb_actions>4</nb_actions>
+		<segment>customVariableName==Generation+Time</segment>
 		<subtable>
 			<row>
 				<label>359</label>
@@ -217,6 +221,7 @@
 	<row>
 		<label>Windows Status Code</label>
 		<nb_actions>4</nb_actions>
+		<segment>customVariableName==Windows+Status+Code</segment>
 		<subtable>
 			<row>
 				<label>24</label>
@@ -262,6 +267,7 @@
 		<revenue>5</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Bot</segment>
 		<subtable>
 			<row>
 				<label>Googlebot/2.1 ( http://www.googlebot.com/bot.html)</label>
@@ -302,6 +308,7 @@
 		<revenue>5</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Forum+status</segment>
 		<subtable>
 			<row>
 				<label>Anonymous</label>
@@ -342,6 +349,7 @@
 		<revenue>5</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==VisitorType</segment>
 		<subtable>
 			<row>
 				<label>NewLoggedOut</label>
diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_day.xml
index 55f90281171f53c5436a5135770b573191f61c83..9a056e87868d56fbf26bf8605d71517c8ecbf862 100644
--- a/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_day.xml
@@ -6,6 +6,7 @@
 				<label>_pk_scount</label>
 				<nb_visits>4</nb_visits>
 				<nb_actions>6</nb_actions>
+				<segment>customVariableName==_pk_scount</segment>
 				<subtable>
 					<row>
 						<label>0</label>
@@ -23,6 +24,7 @@
 				<label>_pk_scat</label>
 				<nb_visits>2</nb_visits>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==_pk_scat</segment>
 				<subtable>
 					<row>
 						<label>Search Category</label>
@@ -37,6 +39,7 @@
 				<label>_pk_scount</label>
 				<nb_visits>3</nb_visits>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==_pk_scount</segment>
 				<subtable>
 					<row>
 						<label>0</label>
@@ -59,6 +62,7 @@
 				<label>_pk_scat</label>
 				<nb_visits>2</nb_visits>
 				<nb_actions>2</nb_actions>
+				<segment>customVariableName==_pk_scat</segment>
 				<subtable>
 					<row>
 						<label>Bad No Result Category :(</label>
@@ -85,6 +89,7 @@
 				<label>_pk_scount</label>
 				<nb_visits>1</nb_visits>
 				<nb_actions>2</nb_actions>
+				<segment>customVariableName==_pk_scount</segment>
 				<subtable>
 					<row>
 						<label>0</label>
@@ -97,6 +102,7 @@
 				<label>_pk_scat</label>
 				<nb_visits>1</nb_visits>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==_pk_scat</segment>
 				<subtable>
 					<row>
 						<label>Bad No Result Category bis :(</label>
@@ -124,6 +130,7 @@
 				<sum_visit_length>541</sum_visit_length>
 				<bounce_count>0</bounce_count>
 				<nb_visits_converted>0</nb_visits_converted>
+				<segment>customVariableName==test+cvar+name</segment>
 				<subtable>
 					<row>
 						<label>test cvar value</label>
diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_month.xml
index 1a0871477a23b2a20865a5aba78442a96595fa3e..50b6b4821e56512c7f67fe3019889a55a816fef4 100644
--- a/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_month.xml
+++ b/tests/PHPUnit/System/expected/test_SiteSearch_AllSites__CustomVariables.getCustomVariables_month.xml
@@ -7,6 +7,7 @@
 				<nb_visits>7</nb_visits>
 				<nb_actions>9</nb_actions>
 				<sum_daily_nb_uniq_visitors>7</sum_daily_nb_uniq_visitors>
+				<segment>customVariableName==_pk_scount</segment>
 				<subtable>
 					<row>
 						<label>0</label>
@@ -33,6 +34,7 @@
 				<nb_visits>4</nb_visits>
 				<nb_actions>5</nb_actions>
 				<sum_daily_nb_uniq_visitors>4</sum_daily_nb_uniq_visitors>
+				<segment>customVariableName==_pk_scat</segment>
 				<subtable>
 					<row>
 						<label>Search Category</label>
@@ -69,6 +71,7 @@
 				<nb_visits>1</nb_visits>
 				<nb_actions>2</nb_actions>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
+				<segment>customVariableName==_pk_scount</segment>
 				<subtable>
 					<row>
 						<label>0</label>
@@ -83,6 +86,7 @@
 				<nb_visits>1</nb_visits>
 				<nb_actions>1</nb_actions>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
+				<segment>customVariableName==_pk_scat</segment>
 				<subtable>
 					<row>
 						<label>Bad No Result Category bis :(</label>
@@ -112,6 +116,7 @@
 				<nb_visits_converted>0</nb_visits_converted>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==test+cvar+name</segment>
 				<subtable>
 					<row>
 						<label>test cvar value</label>
diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml
index 6b9e9e90a5df72fc4b951633b0d1d22eb2b194fa..2cf589667d6a86e1782f426853692eec88d6aa9c 100644
--- a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml
@@ -112,20 +112,24 @@
 		<result prettyDate="Sunday 3 January 2010">
 			<row>
 				
+				<segment>customVariableName==_pk_scount</segment>
 				<idsubdatatable>3205</idsubdatatable>
 			</row>
 			<row>
 				
+				<segment>customVariableName==_pk_scat</segment>
 				<idsubdatatable>3204</idsubdatatable>
 			</row>
 		</result>
 		<result prettyDate="Monday 4 January 2010">
 			<row>
 				
+				<segment>customVariableName==_pk_scount</segment>
 				<idsubdatatable>3208</idsubdatatable>
 			</row>
 			<row>
 				
+				<segment>customVariableName==_pk_scat</segment>
 				<idsubdatatable>3207</idsubdatatable>
 			</row>
 		</result>
diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml
index c30fb00bc6ad2b0296ba3d89038cbd290f484d0a..f659e26078696f7bb38fb3bb84cc6ed5444d16c4 100644
--- a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml
+++ b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml
@@ -81,10 +81,12 @@
 		<result prettyDate="2010, January">
 			<row>
 				
+				<segment>customVariableName==_pk_scount</segment>
 				<idsubdatatable>3230</idsubdatatable>
 			</row>
 			<row>
 				
+				<segment>customVariableName==_pk_scat</segment>
 				<idsubdatatable>3229</idsubdatatable>
 			</row>
 		</result>
diff --git a/tests/PHPUnit/System/expected/test_csvExport_xp0__CustomVariables.getCustomVariables_day.csv b/tests/PHPUnit/System/expected/test_csvExport_xp0__CustomVariables.getCustomVariables_day.csv
index 89e329416e9157f6b133d816fdcbcdcd1aa6dee4..d8449e77cdf17f888efb9f30d498ae680652eefa 100644
Binary files a/tests/PHPUnit/System/expected/test_csvExport_xp0__CustomVariables.getCustomVariables_day.csv and b/tests/PHPUnit/System/expected/test_csvExport_xp0__CustomVariables.getCustomVariables_day.csv differ
diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems__CustomVariables.getCustomVariables_day.xml
index 8dd490bdb35ccbd5ab5843761b052c096c0851e2..1d0ee64c8d067080b684d866ef7bee640c4e3340 100755
--- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems__CustomVariables.getCustomVariables_day.xml
@@ -33,6 +33,7 @@
 		</goals>
 		<nb_conversions>3</nb_conversions>
 		<revenue>3121.11</revenue>
+		<segment>customVariableName==ValueIsZero</segment>
 		<subtable>
 			<row>
 				<label>0</label>
@@ -103,6 +104,7 @@
 		</goals>
 		<nb_conversions>3</nb_conversions>
 		<revenue>3121.11</revenue>
+		<segment>customVariableName==VisitorType</segment>
 		<subtable>
 			<row>
 				<label>NewLoggedOut</label>
@@ -144,6 +146,7 @@
 		<label>_pkc</label>
 		<nb_visits>7</nb_visits>
 		<nb_actions>12</nb_actions>
+		<segment>customVariableName==_pkc</segment>
 		<subtable>
 			<row>
 				<label>Electronics &amp; Cameras</label>
@@ -188,6 +191,7 @@
 		<label>_pkn</label>
 		<nb_visits>6</nb_visits>
 		<nb_actions>11</nb_actions>
+		<segment>customVariableName==_pkn</segment>
 		<subtable>
 			<row>
 				<label>PRODUCT name</label>
@@ -212,6 +216,7 @@
 		<label>_pks</label>
 		<nb_visits>6</nb_visits>
 		<nb_actions>11</nb_actions>
+		<segment>customVariableName==_pks</segment>
 		<subtable>
 			<row>
 				<label>SKU VERY nice indeed</label>
@@ -260,6 +265,7 @@
 		</goals>
 		<nb_conversions>2</nb_conversions>
 		<revenue>3111.11</revenue>
+		<segment>customVariableName==VisitorName</segment>
 		<subtable>
 			<row>
 				<label>Great name!</label>
@@ -296,6 +302,7 @@
 		<label>_pkp</label>
 		<nb_visits>8</nb_visits>
 		<nb_actions>8</nb_actions>
+		<segment>customVariableName==_pkp</segment>
 		<subtable>
 			<row>
 				<label>333</label>
diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__CustomVariables.getCustomVariables_range.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__CustomVariables.getCustomVariables_range.xml
index 1639c238a3456e0fafbd920e572f0c468bc3f9cb..00acc7d7d0ff63b46335ed672ecaa6cec6386179 100644
--- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__CustomVariables.getCustomVariables_range.xml
+++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__CustomVariables.getCustomVariables_range.xml
@@ -23,6 +23,7 @@
 		<revenue>1000</revenue>
 		<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==VisitorType</segment>
 		<subtable>
 			<row>
 				<label>LoggedIn</label>
@@ -87,6 +88,7 @@
 		<revenue>0</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 		<subtable>
 			<row>
 				<label>Value not defined</label>
@@ -112,6 +114,7 @@
 	<row>
 		<label>Status user</label>
 		<nb_actions>3</nb_actions>
+		<segment>customVariableName==Status+user</segment>
 		<subtable>
 			<row>
 				<label>looking at &quot;profile page&quot;</label>
@@ -145,6 +148,7 @@
 		<revenue>0</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 		<subtable>
 			<row>
 				<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -185,6 +189,7 @@
 		<revenue>1000</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Othercustom+value+which+should+be+truncated+abcdefghijklmnopqrstuvwxyz</segment>
 		<subtable>
 			<row>
 				<label>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</label>
@@ -210,6 +215,7 @@
 	<row>
 		<label>Language</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Language</segment>
 		<subtable>
 			<row>
 				<label>FR</label>
@@ -222,6 +228,7 @@
 	<row>
 		<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 		<subtable>
 			<row>
 				<label>Value not defined</label>
diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__CustomVariables.getCustomVariables_range.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__CustomVariables.getCustomVariables_range.xml
index 1639c238a3456e0fafbd920e572f0c468bc3f9cb..00acc7d7d0ff63b46335ed672ecaa6cec6386179 100644
--- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__CustomVariables.getCustomVariables_range.xml
+++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__CustomVariables.getCustomVariables_range.xml
@@ -23,6 +23,7 @@
 		<revenue>1000</revenue>
 		<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==VisitorType</segment>
 		<subtable>
 			<row>
 				<label>LoggedIn</label>
@@ -87,6 +88,7 @@
 		<revenue>0</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 		<subtable>
 			<row>
 				<label>Value not defined</label>
@@ -112,6 +114,7 @@
 	<row>
 		<label>Status user</label>
 		<nb_actions>3</nb_actions>
+		<segment>customVariableName==Status+user</segment>
 		<subtable>
 			<row>
 				<label>looking at &quot;profile page&quot;</label>
@@ -145,6 +148,7 @@
 		<revenue>0</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 		<subtable>
 			<row>
 				<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -185,6 +189,7 @@
 		<revenue>1000</revenue>
 		<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 		<sum_daily_nb_users>0</sum_daily_nb_users>
+		<segment>customVariableName==Othercustom+value+which+should+be+truncated+abcdefghijklmnopqrstuvwxyz</segment>
 		<subtable>
 			<row>
 				<label>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</label>
@@ -210,6 +215,7 @@
 	<row>
 		<label>Language</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==Language</segment>
 		<subtable>
 			<row>
 				<label>FR</label>
@@ -222,6 +228,7 @@
 	<row>
 		<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 		<nb_actions>1</nb_actions>
+		<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 		<subtable>
 			<row>
 				<label>Value not defined</label>
diff --git a/tests/PHPUnit/System/expected/test_reportLimiting__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_reportLimiting__CustomVariables.getCustomVariables_day.xml
index 994f62a320a98a622d249a0ef10faddadfd5c605..6b7a4a8b1c2e5ebb12b2371e366baf7ba1a31f6f 100644
--- a/tests/PHPUnit/System/expected/test_reportLimiting__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_reportLimiting__CustomVariables.getCustomVariables_day.xml
@@ -3,6 +3,7 @@
 	<row>
 		<label>liked</label>
 		<nb_actions>20</nb_actions>
+		<segment>customVariableName==liked</segment>
 		<subtable>
 			<row>
 				<label>y</label>
@@ -19,6 +20,7 @@
 	<row>
 		<label>tweeted</label>
 		<nb_actions>20</nb_actions>
+		<segment>customVariableName==tweeted</segment>
 		<subtable>
 			<row>
 				<label>n</label>
diff --git a/tests/PHPUnit/System/expected/test_reportLimiting_rankingQuery__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_reportLimiting_rankingQuery__CustomVariables.getCustomVariables_day.xml
index 994f62a320a98a622d249a0ef10faddadfd5c605..6b7a4a8b1c2e5ebb12b2371e366baf7ba1a31f6f 100644
--- a/tests/PHPUnit/System/expected/test_reportLimiting_rankingQuery__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_reportLimiting_rankingQuery__CustomVariables.getCustomVariables_day.xml
@@ -3,6 +3,7 @@
 	<row>
 		<label>liked</label>
 		<nb_actions>20</nb_actions>
+		<segment>customVariableName==liked</segment>
 		<subtable>
 			<row>
 				<label>y</label>
@@ -19,6 +20,7 @@
 	<row>
 		<label>tweeted</label>
 		<nb_actions>20</nb_actions>
+		<segment>customVariableName==tweeted</segment>
 		<subtable>
 			<row>
 				<label>n</label>
diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_day.xml
index c92fc500369f229da7af323a53e613532a06614f..ebbd07023b7768573bb46ab3cffa72a63408cd83 100644
--- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_day.xml
@@ -24,6 +24,7 @@
 				</goals>
 				<nb_conversions>3</nb_conversions>
 				<revenue>1000</revenue>
+				<segment>customVariableName==VisitorType</segment>
 				<subtable>
 					<row>
 						<label>LoggedIn</label>
@@ -85,6 +86,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -123,6 +125,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -147,6 +150,7 @@
 			<row>
 				<label>Status user</label>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==Status+user</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -177,6 +181,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>1000</revenue>
+				<segment>customVariableName==Othercustom+value+which+should+be+truncated+abcdefghijklmnopqrstuvwxyz</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</label>
@@ -201,6 +206,7 @@
 			<row>
 				<label>Language</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==Language</segment>
 				<subtable>
 					<row>
 						<label>FR</label>
@@ -212,6 +218,7 @@
 			<row>
 				<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -223,6 +230,7 @@
 			<row>
 				<label>var1</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==var1</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -234,6 +242,7 @@
 			<row>
 				<label>var2</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==var2</segment>
 				<subtable>
 					<row>
 						<label>&amp;#039;looking at &quot;\profile page&quot;&amp;#039;</label>
@@ -245,6 +254,7 @@
 			<row>
 				<label>var3</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==var3</segment>
 				<subtable>
 					<row>
 						<label>\looking at &quot;\profile page&quot;\</label>
diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_week.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_week.xml
index 60639711b9d8873dd6c03f054ebd30516d804b3d..92a4a5c7be5e2bbbf7dbad520fef8492ac9b60df 100644
--- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_week.xml
+++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__CustomVariables.getCustomVariables_week.xml
@@ -25,6 +25,7 @@
 				<revenue>1000</revenue>
 				<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==VisitorType</segment>
 				<subtable>
 					<row>
 						<label>LoggedIn</label>
@@ -89,6 +90,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -129,6 +131,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -154,6 +157,7 @@
 			<row>
 				<label>Status user</label>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==Status+user</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -187,6 +191,7 @@
 				<revenue>1000</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==Othercustom+value+which+should+be+truncated+abcdefghijklmnopqrstuvwxyz</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</label>
@@ -212,6 +217,7 @@
 			<row>
 				<label>Language</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==Language</segment>
 				<subtable>
 					<row>
 						<label>FR</label>
@@ -224,6 +230,7 @@
 			<row>
 				<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -236,6 +243,7 @@
 			<row>
 				<label>var1</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==var1</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -248,6 +256,7 @@
 			<row>
 				<label>var2</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==var2</segment>
 				<subtable>
 					<row>
 						<label>&amp;#039;looking at &quot;\profile page&quot;&amp;#039;</label>
@@ -260,6 +269,7 @@
 			<row>
 				<label>var3</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==var3</segment>
 				<subtable>
 					<row>
 						<label>\looking at &quot;\profile page&quot;\</label>
diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_day.xml
index 5b779b60c60f7317f5928963efa8487f3eec8982..7e941dea109397c827dc6265d48e115279cc8b8d 100644
--- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_day.xml
@@ -24,6 +24,7 @@
 				</goals>
 				<nb_conversions>3</nb_conversions>
 				<revenue>1000</revenue>
+				<segment>customVariableName==VisitorType</segment>
 				<subtable>
 					<row>
 						<label>LoggedIn</label>
@@ -85,6 +86,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -109,6 +111,7 @@
 			<row>
 				<label>Status user</label>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==Status+user</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -139,6 +142,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -177,6 +181,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>1000</revenue>
+				<segment>customVariableName==Othercustom+value+which+should+be+truncated+abcdefghijklmnopqrstuvwxyz</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</label>
@@ -201,6 +206,7 @@
 			<row>
 				<label>Language</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==Language</segment>
 				<subtable>
 					<row>
 						<label>FR</label>
@@ -212,6 +218,7 @@
 			<row>
 				<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_week.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_week.xml
index 6b156a13799a003e06210f4c486c404b1dc6e849..54f91c076fbd1bc04c5df1f83d721b0485037143 100644
--- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_week.xml
+++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_week.xml
@@ -25,6 +25,7 @@
 				<revenue>1000</revenue>
 				<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==VisitorType</segment>
 				<subtable>
 					<row>
 						<label>LoggedIn</label>
@@ -89,6 +90,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -114,6 +116,7 @@
 			<row>
 				<label>Status user</label>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==Status+user</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -147,6 +150,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -187,6 +191,7 @@
 				<revenue>1000</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==Othercustom+value+which+should+be+truncated+abcdefghijklmnopqrstuvwxyz</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</label>
@@ -212,6 +217,7 @@
 			<row>
 				<label>Language</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==Language</segment>
 				<subtable>
 					<row>
 						<label>FR</label>
@@ -224,6 +230,7 @@
 			<row>
 				<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_day.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_day.xml
index 4a549e2004d572c1c1db21d081c422471526a988..304bb2fe6551fc775275287e1f7e431188313b81 100644
--- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_day.xml
+++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_day.xml
@@ -19,6 +19,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -43,6 +44,7 @@
 			<row>
 				<label>Status user</label>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==Status+user</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -73,6 +75,7 @@
 				</goals>
 				<nb_conversions>1</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -116,6 +119,7 @@
 				</goals>
 				<nb_conversions>2</nb_conversions>
 				<revenue>0</revenue>
+				<segment>customVariableName==VisitorType</segment>
 				<subtable>
 					<row>
 						<label>LoggedIn</label>
@@ -153,6 +157,7 @@
 			<row>
 				<label>Language</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==Language</segment>
 				<subtable>
 					<row>
 						<label>FR</label>
@@ -164,6 +169,7 @@
 			<row>
 				<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_week.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_week.xml
index 28956c85233c3f487428f2fc9b1103106c20d1f6..c4f92b8e6b78b68efcf7268d2058d2aa27d5b9ba 100644
--- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_week.xml
+++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_week.xml
@@ -20,6 +20,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>
@@ -45,6 +46,7 @@
 			<row>
 				<label>Status user</label>
 				<nb_actions>3</nb_actions>
+				<segment>customVariableName==Status+user</segment>
 				<subtable>
 					<row>
 						<label>looking at &quot;profile page&quot;</label>
@@ -78,6 +80,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==Value+will+be+VERY+long+and+truncated</segment>
 				<subtable>
 					<row>
 						<label>abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrstuvwxyz----abcdefghijklmnopqrst</label>
@@ -123,6 +126,7 @@
 				<revenue>0</revenue>
 				<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
 				<sum_daily_nb_users>0</sum_daily_nb_users>
+				<segment>customVariableName==VisitorType</segment>
 				<subtable>
 					<row>
 						<label>LoggedIn</label>
@@ -161,6 +165,7 @@
 			<row>
 				<label>Language</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==Language</segment>
 				<subtable>
 					<row>
 						<label>FR</label>
@@ -173,6 +178,7 @@
 			<row>
 				<label>SET WITH EMPTY VALUE PAGE SCOPE</label>
 				<nb_actions>1</nb_actions>
+				<segment>customVariableName==SET+WITH+EMPTY+VALUE+PAGE+SCOPE</segment>
 				<subtable>
 					<row>
 						<label>Value not defined</label>