Skip to content

Commit

Permalink
refactor(index): remove no-op optedIn function
Browse files Browse the repository at this point in the history
we don't need this, as most things are configured through feature flacs
  • Loading branch information
trieloff committed Jul 4, 2024
1 parent 2b28ca8 commit 439b41b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ const formSubmitListener = (e) => sampleRUM('formsubmit', { target: targetSelect
// eslint-disable-next-line no-use-before-define
const mutationObserver = window.MutationObserver ? new MutationObserver(mutationsCallback) : null;

// eslint-disable-next-line no-unused-vars
function optedIn(checkpoint, data) {
// TODO: check config service to know if
return true;
}
// Gets configured collection from the config service for the current domain
function getCollectionConfig() {
// eslint-disable-next-line max-len
Expand All @@ -36,7 +31,7 @@ function getCollectionConfig() {

function trackCheckpoint(checkpoint, data, t) {
const { weight, id } = window.hlx.rum;
if (optedIn(checkpoint, data) && isSelected) {
if (isSelected) {
const sendPing = (pdata = data) => {
// eslint-disable-next-line object-curly-newline, max-len
const body = JSON.stringify({ weight, id, referer: urlSanitizers[window.hlx.RUM_MASK_URL || 'path'](), checkpoint, t, ...data }, KNOWN_PROPERTIES);
Expand Down

0 comments on commit 439b41b

Please sign in to comment.