GDPR Extension
The Magebit GDPR Extension adds GDPR tooling to a Venta/Hyvä store: a cookie consent bar with grouped cookies, Google Consent Mode v2, a per-accept consent log, and a customer Privacy section in My Account covering data download, account deletion with a grace period, and irreversible anonymization. Anonymization events are written to an admin audit log.
Installation
Install the GDPR extension using Composer.
Installation Command:
composer require magebitcom/magento2-module-gdprPost-Installation Steps:
bin/magento module:enable Magebit_GdprExtension
bin/magento setup:upgrade
bin/magento cache:flushConfiguration Access: Navigate to Stores > Configuration > Magebit > GDPR to access GDPR configuration options.
Enable Cookie Restriction Mode (required)
The cookie consent bar relies on Magento's built-in Cookie Restriction Mode. Without it the bar still renders, but Magento keeps setting cookies regardless of the visitor's choice.
- Go to
Stores > Configuration > General > Web. - Open Default Cookie Settings.
- Set Cookie Restriction Mode to Yes, save, and flush the cache.
Extension Configuration
The module is disabled by default. Configure it under Stores > Configuration > Magebit > GDPR. Each section below is a config group; every field also has an inline admin description.

General Settings
- Enable GDPR - Master switch for the entire module.

Cookie Bar Settings
Configuration options
| Field | Description |
|---|---|
| Activate Cookie Notification Bar | Show the consent bar to visitors who have not yet made a choice. |
| Show Cookie Settings Badge on Page | Display a floating badge that re-opens cookie preferences after the notification bar is closed. |
| Automatic Cookie Log Cleanup Interval (Days | Days to retain consent log records before automatic purge. |

Cookie Bar Customization
Configuration options
| Field | Description |
|---|---|
| Cookie Bar Title | Heading shown at the top of the cookie notification bar. |
| Consent Message Text | Text shown inside the cookie notification bar. |
| About Tab Text | Text shown on the About tab of the consent modal. |
| Cookie Declaration Text | Shown in the Details tab footer. Supports links and HTML; use %1 for the last-updated date. |

Consent Mode
Configuration options
| Field | Description |
|---|---|
| Enable | Send the visitor's consent state to Google Consent Mode v2. |
| Permission Types | Map each Google consent type (ad_storage, analytics_storage, functional, and so on) to a cookie group and set its default state. |

GDPR Features
- Days until account is deleted - Grace period before a deletion request is finalised by cron.

Account Deletion Settings
Configuration options
| Field | Description |
|---|---|
| Prevent Deletion for Customer Groups | Customer groups that are not allowed to delete their accounts. |
| Prevent Deletion for Order Statuses | Customers with orders in these statuses cannot delete their accounts. |
| Deletion Confirmation Message | Shown after a successful deletion request (use %d for the day count). |
| Deletion Prevention Message | Shown when deletion is blocked by a restriction. |
- Deletion Card Description / Deletion Modal Description - Text shown on the deletion card and its confirmation modal.
- Cancellation Card Description / Cancellation Modal Description - Text shown on the cancellation card and modal (use
%sfor the deletion date).

Account Anonymization Settings
Configuration options
| Field | Description |
|---|---|
| Prevent Anonymization for Customer Groups | Groups that cannot anonymize. Falls back to the deletion restrictions when empty. |
| Prevent Anonymization for Order Statuses | Order statuses that block anonymization. Falls back to the deletion restrictions when empty. |
- Anonymization Card Description / Anonymization Modal Description - Text shown on the anonymization card and its confirmation modal.
- Audit Log Retention (Days) - Days to retain anonymization audit records before purge. Default 1095 (3 years).

My Account Tab
Configuration options
| Field | Description |
|---|---|
| Enable Privacy tab | Show the Privacy section in the customer's My Account. |
| Privacy tab name | Label for the Privacy section in the account navigation. |
| Allow Policies / Downloading / anonymizing / Deletion / consent tab / Data Protection Officer | Toggle each card in the Privacy section. |
- Data officer section Name / Data Protection Officer Information - Heading and text for the Data Protection Officer card.

Cookie Consent Bar
The bar is Hyvä-native (Alpine.js and Tailwind). It renders site-wide, stores the choice in a first-party cookie, writes a consent-log row per accept, and cleans up cookies when consent is withdrawn. Consent and the log are scoped per website. The bar has three tabs: Consent (per-group toggles), Details, and About.

The Details tab lists each cookie group with its cookie count, and expands to the providers and cookies inside each group.

Expanding a provider reveals its individual cookies with their purpose, storage type, and lifetime:

With Show Cookie Settings Badge enabled (see Cookie Bar Settings), a floating badge lets visitors re-open the preferences after the bar is closed.
Cookie Management
Cookies and groups are managed under the top-level Magebit GDPR admin menu.
Cookie names other modules depend on
The consent groups defined here are read by other extensions to decide whether their own scripts may load. Klaviyo Subscription holds klaviyo.js back until the group containing __kla_id is consented to, and if no group declares that cookie the script never loads at all. Check that any cookie an integration gates on is actually listed in a group.
Cookies
Magebit GDPR > Cookies lists individual cookies (name, provider, group, created/updated). Use Add New Cookie to create one, or Import / Export to manage them in bulk.

Cookie Groups
Magebit GDPR > Cookie Groups defines the groups shown in the consent bar (Essential / Marketing / Analytics / custom).
Configuration Options:
- Name and Code - the code is the stable identifier used by consent-mode mapping and the stored consent.
- Active - Whether the group is used at all.
- Essential - Always on and cannot be declined (for strictly necessary cookies).
- Show in consent - List the group in the consent bar.
- Description - WYSIWYG text shown under the group in the Details tab.
- Included Cookies - The cookies assigned to the group.
- Sort order and store-view scope.

Import and Export Cookies (CSV)
The module ships prepared cookie lists (CSV) for English (en_US) and Latvian (lv_LV) under Setup/Data/CookiePacks/, covering common providers: Adobe Commerce, Cloudflare, Google, Facebook, Instagram, Klaviyo, Mollie, and PayPal. On install only a default set is seeded; the provider packs are not imported automatically. Import the ones you need with the Import action below, or use them as a template for your own.
The Cookies grid has Export and Import actions for managing the catalog in bulk.
- Export downloads the current cookies as a CSV file.
- Import uploads one or more
.csvfiles into the store views you select. Import fills existing groups by their group code; it does not create groups, so define the groups first. Uploads are validated server-side and only.csvis accepted.
The CSV columns are cookie_name, group_code, code, cookie_provider, provider_url, cookie_lifetime, cookie_type, storage_type, cookie_description.

Use the grid's mass actions to delete cookies in bulk.
Cookie Consents Log
Magebit GDPR > Cookie Consents Log records one row per accept event: customer, IP, email, action, website, policy version, and date.

Customer Privacy Section
A cards-based Privacy section under My Account at gdpr/customer/index. Each card is toggled independently from My Account Tab in config. Destructive actions (download, anonymize, delete) require password reauthentication.

The cards are:
- Your Privacy Policies - Links to the terms, privacy, and return policy pages.
- Consent Preferences - Re-opens the cookie-group consent modal from the account.
- Data Protection Officer - Shows the DPO contact info configured in admin.
- Download Your Data - Exports the customer's data as a ZIP of CSV files.
- Anonymize Data - Runs an irreversible scrub of personal data.
- Delete Account - Schedules deletion after a grace period.
Personal Data Download
The customer confirms with their password and receives a ZIP of CSVs covering their account, addresses, wishlist, reviews, compared and viewed products, downloadable products, coupon usage, PayPal billing, and price alerts.
Account Deletion (Grace Period)
A deletion request is password-confirmed and sets a deletion date on the account. A daily cron (delete_users) finalises it after the configured number of days (GDPR Features) by anonymizing, then deleting the record. The customer can cancel from the Privacy section before the cron runs. Deletion is blocked when the customer is in a restricted group or has orders in a restricted status (see Account Deletion Settings).

Account Anonymization (Irreversible)
Anonymization is password-confirmed and runs a transactional scrub across the customer's data surfaces (cart, wishlist, reviews, addresses, newsletter, coupons, payment tokens, and more). Sales records keep country, region, city, and aggregate totals for tax-audit evidence; direct identifiers and high-granularity fields (street, postcode, phone, IP) are removed. The customer is logged out and sent to a confirmation page. Each run writes an audit row with a random UUID and no customer-identifying data. The same group and order-status restrictions apply (see Account Anonymization Settings).

Anonymization Log
Magebit GDPR > Anonymization Log is the audit trail of anonymization events: event UUID, timestamp, store, and outcome. It holds no PII or customer reference. A daily cron purges rows older than the configured retention (Account Anonymization Settings, default 1095 days).

Auditing PII Coverage (CLI)
After installing third-party modules that store customer data, run the audit to find tables with PII-shaped columns that no anonymization strategy covers.
bin/magento magebit:gdpr:audit # uncovered tables only
bin/magento magebit:gdpr:audit --all # also list covered tables
bin/magento magebit:gdpr:audit --json # machine-readable for CIThe command is diagnostic and changes no data. Its exit code is non-zero when uncovered tables are found.
Extending Anonymization
Projects can add their own scrub steps without editing the vendor module. Implement Magebit\GdprExtension\Service\Anonymizer\Strategy\AnonymizationStrategyInterface (a getCode() and a scrub(ScrubContext $context) method) and append it to the orchestrator via di.xml:
<type name="Magebit\GdprExtension\Service\Anonymizer\CustomerAnonymizer">
<arguments>
<argument name="strategies" xsi:type="array">
<item name="acme_loyalty_points" xsi:type="object">Acme\Loyalty\Service\Anonymizer\Strategy\LoyaltyPointsStrategy</item>
</argument>
</arguments>
</type>All strategies run inside one DB transaction; if any throws, the whole scrub rolls back. ScrubContext exposes customerId, originalEmail, anonymizedEmail, and emailScopeSafe for targeting rows. Re-run magebit:gdpr:audit to confirm coverage.