fullstory-browser-sdk icon indicating copy to clipboard operation
fullstory-browser-sdk copied to clipboard

Support recording sampleRate

Open id0Sch opened this issue 4 years ago • 1 comments

As a way to limit traffic and data usage, we (at the company I work for) implemented a recording sampleRate mechanism over the legacy snippet.

we do something like this:

const sampleRate = 0.02

.....

require('./external/fullstory') 
window.FS.shutdown() 

if (Math.random() <= sampleRate) {
	....
	window.FS.restart()
}

It could be nice to have this functionality come out of the box via the npm module. Let me know what you think. Thanks!

id0Sch avatar Dec 10 '20 09:12 id0Sch

Hey @id0Sch thanks for your suggestion! We'll look into this.

patrick-fs avatar Dec 11 '20 16:12 patrick-fs