File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -205,15 +205,16 @@ var client = function(sitekey, privatekey) {
205205 this . setThrottleTime = function ( delay ) { this . settings . setThrottleTime ( delay ) ; }
206206 this . setStatsSessionId = function ( id ) {
207207 this . sessionId = id ;
208- this . userTokenInPersonalization = null ;
208+ this . userTokenInPersonalization = id ;
209+ this . useStatsSessionId = true ;
209210 }
210211 this . getStatsSessionId = function ( ) { return this . sessionId ; }
211212 this . enableLogicalOperators = function ( enableLogicalOperators ) { this . settings . enableLogicalOperators ( enableLogicalOperators ) } ;
212213 this . setSearchOperator = function ( operator ) { this . settings . setSearchOperator ( operator ) } ;
213214
214215 this . sendStatsEvent = function ( type , keyword , data ) {
215216
216- var useUserTokenInCookie = this . userTokenInPersonalization && isPersonalizationTrackingEnabled && isAddSearchCookieConsented ;
217+ var useUserTokenInCookie = ! this . useStatsSessionId && isPersonalizationTrackingEnabled && isAddSearchCookieConsented ;
217218 if ( useUserTokenInCookie && ! cookie . getCookie ( USER_TOKEN_COOKIE_NAME ) ) {
218219 cookie . setCookie ( USER_TOKEN_COOKIE_NAME , this . userTokenInPersonalization , personalizationCookieExpireDays ) ;
219220 }
You can’t perform that action at this time.
0 commit comments