@@ -1087,14 +1087,14 @@ describe('Google Analytics', function() {
10871087 it ( 'should send product impression data via product list viewed' , function ( ) {
10881088 // If using addImpression ever becomes optional, will need to add a setting modification here.
10891089 ga . options . setAllMappedProps = false ;
1090- ga . options . dimensions = { testDimension : 'dimension1' } ;
1091- ga . options . metrics = { testMetric : 'metric1' } ;
1090+ ga . options . dimensions = { testDimension : 'dimension1' , productDimension : 'dimension2' } ;
1091+ ga . options . metrics = { testMetric : 'metric1' , productMetric : 'metric2' } ;
10921092
10931093 analytics . track ( 'Product List Viewed' , {
10941094 category : 'cat 1' ,
10951095 list_id : '1234' ,
10961096 products : [
1097- { product_id : '507f1f77bcf86cd799439011' }
1097+ { product_id : '507f1f77bcf86cd799439011' , productDimension : 'My Product Dimension' , productMetric : 'My Product Metric' }
10981098 ] ,
10991099 testDimension : true ,
11001100 testMetric : true
@@ -1105,7 +1105,9 @@ describe('Google Analytics', function() {
11051105 id : '507f1f77bcf86cd799439011' ,
11061106 category : 'cat 1' ,
11071107 list : '1234' ,
1108- position : 1
1108+ position : 1 ,
1109+ dimension2 : 'My Product Dimension' ,
1110+ metric2 : 'My Product Metric'
11091111 } ] ) ;
11101112 analytics . deepEqual ( toArray ( window . ga . args [ 3 ] ) , [ 'send' , 'event' , 'cat 1' , 'Product List Viewed' , {
11111113 dimension1 : 'true' ,
@@ -1117,8 +1119,8 @@ describe('Google Analytics', function() {
11171119 it ( 'should send product impression data via product list filtered' , function ( ) {
11181120 // If using addImpression ever becomes optional, will need to add a setting modification here.
11191121 ga . options . setAllMappedProps = false ;
1120- ga . options . dimensions = { testDimension : 'dimension1' } ;
1121- ga . options . metrics = { testMetric : 'metric1' } ;
1122+ ga . options . dimensions = { testDimension : 'dimension1' , productDimension : 'dimension2' } ;
1123+ ga . options . metrics = { testMetric : 'metric1' , productMetric : 'metric2' } ;
11221124
11231125 analytics . track ( 'Product List Filtered' , {
11241126 category : 'cat 1' ,
@@ -1136,7 +1138,7 @@ describe('Google Analytics', function() {
11361138 value : 'desc'
11371139 } ] ,
11381140 products : [
1139- { product_id : '507f1f77bcf86cd799439011' }
1141+ { product_id : '507f1f77bcf86cd799439011' , productDimension : 'My Product Dimension' , productMetric : 'My Product Metric' }
11401142 ] ,
11411143 testDimension : true ,
11421144 testMetric : true
@@ -1148,7 +1150,9 @@ describe('Google Analytics', function() {
11481150 category : 'cat 1' ,
11491151 list : '1234' ,
11501152 position : 1 ,
1151- variant : 'department:beauty,price:under::price:desc'
1153+ variant : 'department:beauty,price:under::price:desc' ,
1154+ dimension2 : 'My Product Dimension' ,
1155+ metric2 : 'My Product Metric'
11521156 } ] ) ;
11531157 analytics . deepEqual ( toArray ( window . ga . args [ 3 ] ) , [ 'send' , 'event' , 'cat 1' , 'Product List Filtered' , {
11541158 dimension1 : 'true' ,
0 commit comments