Usercentrics v2 extension: domain filter question

Bronze Contributor
Bronze Contributor

Hi there,

we are heavily relying on the Usercentrics v2 privacy extension for our websites.

Sometime in the last months, there has been an update to the extension, namely the introduction of a required domain filter for which the extension will be active.

We encountered two major issues with this:

1. The domain list is required instead of optional

As each of our websites gets its own profile, there is no need to have a required domain filter. We want the CMP (extension) to be active on ALL domains/sites using that profile. If you enter a wrong domain (for whatever reason, might be a simple mistake), or forget one, the CMP extension is disabled for the whole website using that profile! Which means, no blocking of tags by default. In case you need this filtering, this might make sense, but in our case this is a serious design flaw, as the default should be "block everything unless I tell you otherwise".

Suggestion: make the domain filter optional, so you can use it if you need to filter for domains in a profile.

 

2. The logic to check the current domain is flawed

According to your documentation , it should be enough to enter the domain names, e.g., "example.com". Which makes perfect sense.

Looking into the code of the extension, this is not true, though:

var domains = Object.keys(window.tealiumCmpIntegration.map);
var domainName = '';
for (var i = 0; i < domains.length; i++) {
          var domain = domains[i];
          var currentDomain = document.location.href.replace(/(^\w+:|^)\/\//, '');
          domain.endsWith('/') ? (domain = domain.slice(0, -1)) : domain;
          currentDomain.endsWith('/')
            ? (currentDomain = currentDomain.slice(0, -1))
            : currentDomain;
          if (domain === currentDomain) {
            domainName = domain;
            break;
          }
        }
if (!domainName) {
          logger('No valid domain found. Tealium CMP integration inactive.');
          isValidDomain = false;
          return;
 }

As you can see, it uses "document.location.href" instead of "document.location.hostname". Because of that, I'd have to enter ALL paths for which the extensions should work, e.g., "example.com/path/", "example.com/path2" and so on. Is this the intended behaviour? I hope not, because that would take a huge effort to maintain.

Suggestion: use "doucment.location.hostname" to resolve the current domain.

 

Am I missing something here? At the moment the only way to "safely" use the extension (= the old behaviour), is to keep the domain filter empty and just dismiss the configuration error when publishing a profile. (edit: I just checked, it's worse than I expected: keeping the domain list empty will prevent the extension from being active, as "domainName" never gets populated if "domains" is empty.)

Cheers,

Eric

4 REPLIES 4

Usercentrics v2 extension: domain filter question

Community Manager
Community Manager

@dbx-eric Thanks for the feedback. I asked the Product team to review this and I will let you know what they say.

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Usercentrics v2 extension: domain filter question

Community Manager
Community Manager

@dbx-eric Quick follow-up... The Product team acknowledged the issue and has prioritized a fix. Thanks for your detailed post. I will reply again when the fix is released.

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Usercentrics v2 extension: domain filter question

Bronze Contributor
Bronze Contributor

Hey @TealiumJustin,

thanks for the update, that sounds like good news!

Should I create a support ticket as well, or would this be redundant at this point? (I wasn't sure if this is the correct forum to report this issue).

Usercentrics v2 extension: domain filter question

Tealium Employee

Hi @dbx-eric ,

thanks very much for the detailed feedback!  You weren't missing anything at all, that feature obviously wasn't ready for release - we rolled it back on Friday evening.

The rollback removed the feature, but you might still UI errors in that extension. If you do, adding a fresh extension (and replicating the setup), then removing the old extension is the best fix, and should restore the expected functionality.

I'm very sorry for the hassle - if you have any questions at all, please reach out to me directly!

Best
Caleb

Public