File tree 1 file changed +20
-1
lines changed
plugins/star-rating/frontend/public/templates
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 299
299
dow : dow
300
300
} ;
301
301
302
+ try {
303
+ custom = JSON . parse ( custom ) ;
304
+ if ( custom && custom . sg ) {
305
+ custom = custom . sg ;
306
+ }
307
+ else {
308
+ custom = { } ;
309
+ }
310
+ }
311
+ catch ( error ) {
312
+ custom = { } ;
313
+ }
314
+
315
+ for ( var key in custom ) {
316
+ if ( ! event . segmentation [ key ] ) {
317
+ event . segmentation [ key ] = custom [ key ] ;
318
+ }
319
+ }
320
+
302
321
document . getElementById ( 'countly-feedback-comment-textarea' ) . value = "" ;
303
322
document . getElementById ( 'countly-feedback-contact-me-email' ) . value = "" ;
304
323
394
413
}
395
414
$ . ajax ( {
396
415
"type" : "GET" ,
397
- "url" : url + '/i/feedback/input?events=' + encodeURIComponent ( JSON . stringify ( [ eventObject ] ) ) + '&app_key=' + app_key + '&device_id=' + device_id + '&sdk_name=' + sdk_name + ( sdk_version ? '&sdk_version=' + sdk_version : '' ) + '×tamp=' + Date . now ( ) + '&hour=' + h + '&dow=' + dow + '&app_version=' + app_version + '&custom=' + encodeURIComponent ( custom ) ,
416
+ "url" : url + '/i/feedback/input?events=' + encodeURIComponent ( JSON . stringify ( [ eventObject ] ) ) + '&app_key=' + app_key + '&device_id=' + device_id + '&sdk_name=' + sdk_name + ( sdk_version ? '&sdk_version=' + sdk_version : '' ) + '×tamp=' + Date . now ( ) + '&hour=' + h + '&dow=' + dow + '&app_version=' + app_version ,
398
417
"success" : function ( response ) {
399
418
document . getElementsByClassName ( "success-modal-content" ) [ 0 ] . style . display = "flex" ;
400
419
document . getElementsByClassName ( "modal-content" ) [ 0 ] . style . display = "none" ;
You can’t perform that action at this time.
0 commit comments