PHPackages                             snk/magento2-module-usercentrics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. snk/magento2-module-usercentrics

AbandonedArchivedMagento2-module

snk/magento2-module-usercentrics
================================

Magento 2 module for Usercentrics integration

v0.1.1-beta(5y ago)33.4k4[1 issues](https://github.com/kirchbergerknorr/magento2-module-usercentrics/issues)MITPHPPHP ^7.1

Since Jul 9Pushed 4y ago3 watchersCompare

[ Source](https://github.com/kirchbergerknorr/magento2-module-usercentrics)[ Packagist](https://packagist.org/packages/snk/magento2-module-usercentrics)[ RSS](/packages/snk-magento2-module-usercentrics/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

SNK Usercentrics Magento 2 Integration
======================================

[](#snk-usercentrics-magento-2-integration)

**Extension for Magento 2**

Overview
--------

[](#overview)

**TODO**

Requirements
------------

[](#requirements)

Magento 2.3.\*, PHP &gt;7.1

Installation
------------

[](#installation)

Install with composer:

```
composer require snk/magento2-module-usercentrics

```

Configuration details
---------------------

[](#configuration-details)

Go to `Stores->Configuration->Snk->Usercentrics`

- *Enable* - enable of disable module for scope.
- *Settings ID* - the configuration ID from your Usercentrics account.
- *Enable Smart Data Protector* - enable [Usercentrics Smart Data Protector ](https://docs.usercentrics.com/#/smart-data-protector).
- *Enable Page Reload After Consent Revoked* - reload page if user revokes a consent.
- *Script URL* - usercentrics script URL. It should not but may change.
- *Selectors* - configuration which decides which parts of Magento application must be processed.

#### Selectors

[](#selectors)

*Cookie group* of each selector corresponds to separate service names under *Data Processing Services*.

For example, here it's "Matomo":

[![Cookie Group](docs/cookie_group.png)](docs/cookie_group.png)

There are three types of selectors:

- block
- template
- regex

The module iterates through the output of Magento blocks and tries to match them against the selectors.

*Block* selectors look for magento block name in layout.

*Template* selectors look for HTML from specific templates.

*Regex* selectors are the most flexible and the most dangerous type, they try to match every block against the configured regexp.

Integration
-----------

[](#integration)

The module adjusts `` tags in selected blocks of HTML output by changing `type` to `text/plain` and adding `data-usercentrics` attribute with the cookie group.

Some magento scripts are initialized in a declarative way, for example:

```

    {
        "*": {
            "Vendor_Module/js/some-cool-script": {
                "config": "value"
            }
        }
    }

```

Unfortunately Usercentrics cannot set script type back to `x-magento/init` so such calls must be done imperatively in order for Usercentrics to function properly.

So the above can should be rewritten like this:

```

    require([
        'jquery',
        'mage/apply/main'
    ], function ($, mage) {
        $(function () {
            mage.applyFor(
                '*',
                {
                    "config": "value"
                },
                'Vendor_Module/js/some-cool-script',
            );
        });
    });

```

Authors
-------

[](#authors)

Oleh Kravets [](mailto:oleh.kravets@snk.de)

Lisence
-------

[](#lisence)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

3

Last Release

2109d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4d8abef2bb0800bf0e32c05b19abac76f9a2385bf3b36a7b4065556551bcf94?d=identicon)[snk](/maintainers/snk)

---

Top Contributors

[![xpoback](https://avatars.githubusercontent.com/u/4457842?v=4)](https://github.com/xpoback "xpoback (8 commits)")

---

Tags

consent-managementmagento2usercentricsmagento 2usercentricssnk

### Embed Badge

![Health badge](/badges/snk-magento2-module-usercentrics/health.svg)

```
[![Health](https://phpackages.com/badges/snk-magento2-module-usercentrics/health.svg)](https://phpackages.com/packages/snk-magento2-module-usercentrics)
```

###  Alternatives

[mageplaza/module-smtp

SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers

3015.9M8](/packages/mageplaza-module-smtp)[magepal/magento2-gmailsmtpapp

Magento 2 SMTP Extension - Configure Magento 2 to send all transactional email using Gmail, G Suite, Amazon SES, Office360, Mailgun, SendGrid, Mandrill or any other SMTP servers

3321.8M2](/packages/magepal-magento2-gmailsmtpapp)[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2671.5M4](/packages/magepal-magento2-googletagmanager)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[mageplaza/magento-2-social-login

Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps

1841.2M5](/packages/mageplaza-magento-2-social-login)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
