@@ -17,7 +17,7 @@ export function trackEvent(category, action, label, value) {
1717
1818async function sendTrackMessage ( type , category , action , label , value ) {
1919 if ( location . href . indexOf ( 'chrome-extension://' ) !== - 1 ) {
20- await postAnalyticsDataByApi ( type , category , action ) ;
20+ await postAnalyticsDataByApi ( type , category , action , label ) ;
2121 } else {
2222 if ( window . ga ) {
2323 ga ( 'send' , type , category , action , label , value ) ;
@@ -37,7 +37,7 @@ function getCustomerId() {
3737 return cid ;
3838}
3939
40- async function postAnalyticsDataByApi ( type , category , action ) {
40+ async function postAnalyticsDataByApi ( type , category , action , label ) {
4141 const url = "https://www.google-analytics.com/collect" ;
4242 const gaParams = new URLSearchParams ( ) ;
4343 gaParams . append ( "v" , 1 ) ;
@@ -46,7 +46,8 @@ async function postAnalyticsDataByApi(type, category, action) {
4646 gaParams . append ( "dl" , window . location . host ) ;
4747 gaParams . append ( "ul" , navigator . language ) ;
4848 gaParams . append ( "de" , document . characterSet ) ;
49- gaParams . append ( "dt" , new Date ( ) . toUTCString ( ) ) ;
49+ gaParams . append ( "dt" , document . title ) ;
50+ gaParams . append ( "el" , label ? label : null ) ;
5051 gaParams . append ( "t" , type ) ;
5152 gaParams . append ( "ec" , category ) ;
5253 gaParams . append ( "ea" , action ) ;
0 commit comments