Skip to content

Commit

Permalink
fix(lib): update scripts/aem.js to aem.js@2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Aug 19, 2024
1 parent 2b74bad commit b9b544e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ function sampleRUM(checkpoint, data) {
window.hlx = window.hlx || {};
sampleRUM.enhance = () => {};
if (!window.hlx.rum) {
const weight = new URLSearchParams(window.location.search).get('rum') === 'on' ? 1 : 100;
const weight = (window.SAMPLE_PAGEVIEWS_AT_RATE === 'high' && 10)
|| (window.SAMPLE_PAGEVIEWS_AT_RATE === 'low' && 1000)
|| (new URLSearchParams(window.location.search).get('rum') === 'on' && 1)
|| 100;
const id = Math.random().toString(36).slice(-4);
const isSelected = Math.random() * weight < 1;
// eslint-disable-next-line object-curly-newline, max-len
Expand Down

0 comments on commit b9b544e

Please sign in to comment.