@@ -106,16 +106,6 @@ function buildTracks() {
106
106
setCookie ( key , value , ttl ) ;
107
107
} ;
108
108
109
- const loadWpcomIdentity = function ( ) {
110
- const wpcomCookie =
111
- getCookie ( 'wordpress' ) ||
112
- getCookie ( 'wordpress_sec' ) ||
113
- getCookie ( 'wordpress_loggedin' ) ;
114
- if ( wpcomCookie ) {
115
- return get ( userNameCookie ) ;
116
- }
117
- } ;
118
-
119
109
const newAnonId = function ( ) {
120
110
const randomBytesLength = 18 ; // 18 * 4/3 = 24
121
111
let randomBytes : number [ ] | Uint8Array = [ ] ;
@@ -133,23 +123,6 @@ function buildTracks() {
133
123
return btoa ( String . fromCharCode . apply ( String , randomBytes as number [ ] ) ) ;
134
124
} ;
135
125
136
- const loadIdentity = function ( ) {
137
- if ( userId ) {
138
- return ;
139
- }
140
- userId = loadWpcomIdentity ( ) ;
141
- if ( userId ) {
142
- userIdType = 'wpcom:user_id' ;
143
- } else {
144
- userIdType = 'anon' ;
145
- userId = get ( userAnonCookie ) ;
146
- if ( ! userId ) {
147
- userId = newAnonId ( ) ;
148
- set ( userAnonCookie , userId ) ;
149
- }
150
- }
151
- } ;
152
-
153
126
const getQueries = function ( ) {
154
127
const queries = get ( queriesCookie ) ;
155
128
return queries ? queries . split ( ' ' ) : [ ] ;
@@ -238,7 +211,6 @@ function buildTracks() {
238
211
} ;
239
212
240
213
const send = function ( query : Query ) {
241
- loadIdentity ( ) ;
242
214
retryQueries ( ) ;
243
215
query . _ui = userId ;
244
216
query . _ut = userIdType ;
@@ -317,7 +289,7 @@ function buildTracks() {
317
289
}
318
290
319
291
userId = newUserId ;
320
- userIdType = 'wpcom :user_id' ;
292
+ userIdType = 'simplenote :user_id' ;
321
293
set ( userNameCookie , userId ) ;
322
294
const anonId = get ( userAnonCookie ) ;
323
295
if ( anonId ) {
@@ -334,7 +306,6 @@ function buildTracks() {
334
306
userLogin = null ;
335
307
set ( userNameCookie , '' , - 1 ) ;
336
308
set ( userAnonCookie , '' , - 1 ) ;
337
- loadIdentity ( ) ;
338
309
} ;
339
310
340
311
const setProperties = function ( properties : Query ) {
0 commit comments