Skip to content

Commit

Permalink
fix(lib): update scripts/aem.js to aem.js@2.5.2 (#391)
Browse files Browse the repository at this point in the history
Test URL: https://update-lib-aem-patch-2-5-2--aem-boilerplate--adobe.hlx.live/
Release Notes: https://github.com/adobe/aem-lib/releases/tag/v2.5.2

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
  • Loading branch information
adobe-bot and semantic-release-bot authored Aug 22, 2024
1 parent 2b74bad commit 8f569fa
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 8f569fa

Please sign in to comment.