Skip to content

Commit 3c6b093

Browse files
author
Jack Crish
committed
clear logs
1 parent f7a9c46 commit 3c6b093

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

src/app/containers/MainContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
import { useStoreContext } from '../store';
1414
import MPID from "../user_id/user_id";
1515

16-
const cookie = require("cookie");
1716
const mixpanel = require("mixpanel").init("12fa2800ccbf44a5c36c37bc9776e4c0", {
1817
debug: true,
1918
protocol: "https"
@@ -77,8 +76,9 @@ function MainContainer(): any {
7776
* get set cookies for mixpanel analytics
7877
**/
7978
useEffect( () => {
80-
//console.log("MP ", Object.keys(mixpanel));
81-
//attempt to read cookies
79+
/**
80+
* create new user and attempt to read cookies
81+
*/
8282
const user = new MPID();
8383
/**
8484
* If developing turn tracking off by setting user.debug to true;

src/app/user_id/user_id.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class MPID{
99
}
1010

1111
setCookie(){
12-
console.log(" Set Cookie ");
1312
//create a string of random data
1413
this.cookie = cookie.serialize("reactime", crypto.randomBytes(64).toString('hex') );
1514
this.distinct_id = this.cookie?.reactime?.slice(0, 20);
@@ -22,9 +21,7 @@ class MPID{
2221

2322
}
2423

25-
getCookie(){
26-
console.log(" get Cookie");
27-
24+
getCookie(){
2825
if(this.cookie){
2926
return this.cookie;
3027
}else{
@@ -34,19 +31,14 @@ class MPID{
3431
}
3532

3633
checkDocumentCookie(doc){
37-
console.log(" Check Document Cookie ", cookie.parse( doc.cookie ));
3834
let parsedCookie = cookie.parse(doc.cookie);
3935

4036
if( parsedCookie?.reactime ){
41-
console.log( "reactime cookie found" );
42-
this.cookie = parsedCookie?.reactime;
43-
44-
if(!this.distinct_id){
45-
console.log(" set dId");
37+
this.cookie = parsedCookie?.reactime;
38+
if(!this.distinct_id){
4639
this.distinct_id = parsedCookie?.reactime?.slice(0, 20);
4740
}
48-
}else{
49-
console.log("No reactime cookie found. Attempting setCookie");
41+
}else{
5042
this.setCookie();
5143
return false;
5244
}

0 commit comments

Comments
 (0)