LUX uses a cookie to track page views across a user's session. To prevent this cookie from being set before a user has given their consent, you can load LUX in two stages.
The LUX snippet contains two parts: the inline snippet, and the lux.js script.
Normally you would load LUX by putting both the inline snippet and the lux.js script into the <head> of your pages. To prevent LUX from setting a cookie straight away, you should put just the inline snippet into the <head> of your pages. This will allow LUX to collect CPU timing data, and will also allow you to use the LUX API like normal.
var s = document.createElement("script");
s.src = "https://cdn.speedcurve.com/js/lux.js?id=LUX_ID";
s.async = true;
This will cause the lux.js script to be loaded into the page. After this, LUX will set the session cookie and track performance as normal.