const fpPromise = import('https://fpjscdn.net/v3/My api key')
.then(FingerprintJS => FingerprintJS.load({ region: "us" }));
// Get the visitor identifier when you need it.
fpPromise
.then(fp => fp.get())
.then(result => {
console.log(result.visitorId, result.requestId);
bubble_fn_keepID(result.requestId);
});
(Then the bubble_fn_keepID appears to have no value)
Are you able to verify that the bubble_fn_keepID event is definitely triggering? That would be step 1 in debugging. If it’s definitely triggering an event, and it’s not publishing a value, did you make sure to set an output type on the JavascriptToBubble element?
This is needed for Bubble to know what kind of data to expect from the function.
Ensure that both Publish Value and Trigger Event settings of the JavascriptToBubble element are checked. Also check the function’s suffix value has no additional spaces (in the element settings).
If they are, then what you can do is in your code, store result.requestId in a new variable before passing it to bubble_fn_keepID.