JavaScript pixel to check track user
In some JavaScript engines (if I remember correctly, V8) cannot optimize code inside a try-catch. So while it may be negligible in this case, it's a practice to avoid. The workaround to it is to move out the code from the try catch to a function and call that function from the try-catch instead.

Not all your cookie names appear to be in variables. Move them into variables for consistency as well as to avoid hardcoding the cookie names everywhere.

Lastly, ES6 modules are by default run in strict mode. So no need to define 'use strict';.

The code can be simplified into the following. If you just separate the IO from the data manipulation, you can easily see patterns in the code which you can simplify.

import Cookie from 'js-cookie';
import  _ from '../helpers';

module.exports = (event) =&gt; {
  const uidCookieName = 'sp';
  const pidCookieName = 'pID';
  const sidCookieName = 'sID';
  const suCookieName  = 'su';

  const sID = Cookie.get(sidCookieName);
  const uID = Cookie.get(uidCookieName) || _.uuid();
  const pID = Cookie.get(pidCookieName) || _.uuid();
  const su  = Cookie.get(suCookieName)  || _.uuid();

  const uNw = !!Cookie.get(uidCookieName);
  const uUq = su ? 0 : 1; 

  Cookie.set(uidCookieName, uID);
  Cookie.set(pidCookieName, pID);
  Cookie.set(suCookieName, su, { expires: 30 });

  return { uID, sID, pID, uNw, uUq }; 
}