修改 品牌 数据埋点 review by hongmo
Showing
1 changed file
with
31 additions
and
2 deletions
@@ -81,10 +81,22 @@ class BrandContainer extends Component { | @@ -81,10 +81,22 @@ class BrandContainer extends Component { | ||
81 | this.props.actions.searchHistory(); | 81 | this.props.actions.searchHistory(); |
82 | this.props.actions.hotKeyword(); | 82 | this.props.actions.hotKeyword(); |
83 | 83 | ||
84 | + let gender = 0; | ||
85 | + if (this.props.brand.selectedChannelId == 1) { | ||
86 | + gender = 1; | ||
87 | + } else if (this.props.brand.selectedChannelId == 2) { | ||
88 | + gender = 0; | ||
89 | + } else if (this.props.brand.selectedChannelId == 3) { | ||
90 | + gender = 2; | ||
91 | + } else if (this.props.brand.selectedChannelId == 4) { | ||
92 | + gender = 3; | ||
93 | + } | ||
84 | 94 | ||
85 | let params = { | 95 | let params = { |
86 | CAT_NUM: parseInt(selectedChannelId) + '', | 96 | CAT_NUM: parseInt(selectedChannelId) + '', |
97 | + GENR: gender + '', | ||
87 | }; | 98 | }; |
99 | + | ||
88 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SG', params); | 100 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SG', params); |
89 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_CH', params); | 101 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_CH', params); |
90 | } | 102 | } |
@@ -103,7 +115,7 @@ class BrandContainer extends Component { | @@ -103,7 +115,7 @@ class BrandContainer extends Component { | ||
103 | if (this.props.brand.brandFliter == 1 || this.props.brand.brandFliter == 2) { | 115 | if (this.props.brand.brandFliter == 1 || this.props.brand.brandFliter == 2) { |
104 | eventName = 'YB_CATEGORY_BRAND_LIST_IMAGE'; | 116 | eventName = 'YB_CATEGORY_BRAND_LIST_IMAGE'; |
105 | } else { | 117 | } else { |
106 | - eventName = 'YB_CATEGORY_BRAND_LIST_TEXT'; | 118 | + eventName = 'YB_CATEGORY_BRAND_LIST_TEXT'; |
107 | } | 119 | } |
108 | 120 | ||
109 | if (fromSearch) { | 121 | if (fromSearch) { |
@@ -186,8 +198,20 @@ class BrandContainer extends Component { | @@ -186,8 +198,20 @@ class BrandContainer extends Component { | ||
186 | _onPressFilter(value) { | 198 | _onPressFilter(value) { |
187 | this.props.actions.setBrandFilter(value); | 199 | this.props.actions.setBrandFilter(value); |
188 | 200 | ||
201 | + let gender = 0; | ||
202 | + if (this.props.brand.selectedChannelId == 1) { | ||
203 | + gender = 1; | ||
204 | + } else if (this.props.brand.selectedChannelId == 2) { | ||
205 | + gender = 0; | ||
206 | + } else if (this.props.brand.selectedChannelId == 3) { | ||
207 | + gender = 2; | ||
208 | + } else if (this.props.brand.selectedChannelId == 4) { | ||
209 | + gender = 3; | ||
210 | + } | ||
211 | + | ||
189 | let params = { | 212 | let params = { |
190 | CAT_NUM: parseInt(value) + 1 + '', | 213 | CAT_NUM: parseInt(value) + 1 + '', |
214 | + GENR: gender + '', | ||
191 | }; | 215 | }; |
192 | 216 | ||
193 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SG', params); | 217 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SG', params); |
@@ -209,19 +233,24 @@ class BrandContainer extends Component { | @@ -209,19 +233,24 @@ class BrandContainer extends Component { | ||
209 | reourceForLifeStyle, | 233 | reourceForLifeStyle, |
210 | } = this.props.brand; | 234 | } = this.props.brand; |
211 | 235 | ||
236 | + let gender = 0; | ||
212 | let channelId = channel.id; | 237 | let channelId = channel.id; |
213 | let brandListNeedRequest; | 238 | let brandListNeedRequest; |
214 | let reourceNeedRequest; | 239 | let reourceNeedRequest; |
215 | if (channelId == 1) { | 240 | if (channelId == 1) { |
241 | + gender = 1; | ||
216 | brandListNeedRequest = brandListForBoy.get('hasSuccess'); | 242 | brandListNeedRequest = brandListForBoy.get('hasSuccess'); |
217 | reourceNeedRequest = reourceForBoy.get('hasSuccess'); | 243 | reourceNeedRequest = reourceForBoy.get('hasSuccess'); |
218 | }else if (channelId == 2) { | 244 | }else if (channelId == 2) { |
245 | + gender = 0; | ||
219 | brandListNeedRequest = brandListForGirl.get('hasSuccess'); | 246 | brandListNeedRequest = brandListForGirl.get('hasSuccess'); |
220 | reourceNeedRequest = reourceForGirl.get('hasSuccess'); | 247 | reourceNeedRequest = reourceForGirl.get('hasSuccess'); |
221 | }else if (channelId == 3) { | 248 | }else if (channelId == 3) { |
249 | + gender = 2; | ||
222 | brandListNeedRequest = brandListForKid.get('hasSuccess'); | 250 | brandListNeedRequest = brandListForKid.get('hasSuccess'); |
223 | reourceNeedRequest = reourceForKid.get('hasSuccess'); | 251 | reourceNeedRequest = reourceForKid.get('hasSuccess'); |
224 | }else if (channelId == 4) { | 252 | }else if (channelId == 4) { |
253 | + gender = 3; | ||
225 | brandListNeedRequest = brandListForLifeStyle.get('hasSuccess'); | 254 | brandListNeedRequest = brandListForLifeStyle.get('hasSuccess'); |
226 | reourceNeedRequest = reourceForLifeStyle.get('hasSuccess'); | 255 | reourceNeedRequest = reourceForLifeStyle.get('hasSuccess'); |
227 | } | 256 | } |
@@ -237,8 +266,8 @@ class BrandContainer extends Component { | @@ -237,8 +266,8 @@ class BrandContainer extends Component { | ||
237 | 266 | ||
238 | let params = { | 267 | let params = { |
239 | CAT_NUM: channelId + '', | 268 | CAT_NUM: channelId + '', |
269 | + GENR: gender + '', | ||
240 | }; | 270 | }; |
241 | - | ||
242 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_CH', params); | 271 | NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_CH', params); |
243 | } | 272 | } |
244 | 273 |
-
Please register or login to post a comment