@@ -106,16 +106,6 @@ function buildTracks() {
106106 setCookie ( key , value , ttl ) ;
107107 } ;
108108
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-
119109 const newAnonId = function ( ) {
120110 const randomBytesLength = 18 ; // 18 * 4/3 = 24
121111 let randomBytes : number [ ] | Uint8Array = [ ] ;
@@ -133,23 +123,6 @@ function buildTracks() {
133123 return btoa ( String . fromCharCode . apply ( String , randomBytes as number [ ] ) ) ;
134124 } ;
135125
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-
153126 const getQueries = function ( ) {
154127 const queries = get ( queriesCookie ) ;
155128 return queries ? queries . split ( ' ' ) : [ ] ;
@@ -238,7 +211,6 @@ function buildTracks() {
238211 } ;
239212
240213 const send = function ( query : Query ) {
241- loadIdentity ( ) ;
242214 retryQueries ( ) ;
243215 query . _ui = userId ;
244216 query . _ut = userIdType ;
@@ -317,7 +289,7 @@ function buildTracks() {
317289 }
318290
319291 userId = newUserId ;
320- userIdType = 'wpcom :user_id' ;
292+ userIdType = 'simplenote :user_id' ;
321293 set ( userNameCookie , userId ) ;
322294 const anonId = get ( userAnonCookie ) ;
323295 if ( anonId ) {
@@ -334,7 +306,6 @@ function buildTracks() {
334306 userLogin = null ;
335307 set ( userNameCookie , '' , - 1 ) ;
336308 set ( userAnonCookie , '' , - 1 ) ;
337- loadIdentity ( ) ;
338309 } ;
339310
340311 const setProperties = function ( properties : Query ) {
0 commit comments