PHPackages                             iurijorbenadze/mautic-merge-anonymous-contact-plugin - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iurijorbenadze/mautic-merge-anonymous-contact-plugin

ActiveMautic-plugin[Utility &amp; Helpers](/categories/utility)

iurijorbenadze/mautic-merge-anonymous-contact-plugin
====================================================

A Mautic plugin for automatically merging anonymous contacts with identified contacts.

10PHP

Since May 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/iuriJorbenadze/MauticMergeAnonymousContactPluginBundle)[ Packagist](https://packagist.org/packages/iurijorbenadze/mautic-merge-anonymous-contact-plugin)[ RSS](/packages/iurijorbenadze-mautic-merge-anonymous-contact-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Mautic Merge Anonymous Contact Plugin
=====================================

[](#mautic-merge-anonymous-contact-plugin)

Description
-----------

[](#description)

The **Mautic Merge Anonymous Contact Plugin** improves Mautic's contact management by automatically merging anonymous contacts with identified contacts during the same browser session. This ensures accurate tracking continuity and consolidates contact data for better insights.

Features
--------

[](#features)

- Automatically merges anonymous contacts into identified contacts.
- Reassigns page hits, tracking history, and custom fields to the identified contact.
- Retains IP addresses and other tracking information from the anonymous contact.
- Ensures accurate data consolidation and eliminates duplicate contact entries.

Installation Instructions
-------------------------

[](#installation-instructions)

### Step 1: Download the Plugin

[](#step-1-download-the-plugin)

1. Download the plugin repository as a ZIP file or clone it from the repository.

### Step 2: Place the Plugin in the Correct Directory

[](#step-2-place-the-plugin-in-the-correct-directory)

1. Extract the plugin files and move the folder to the `plugins/` directory of your Mautic installation.
2. Rename the folder to `MauticMergeAnonymousContactPluginBundle`.

### Step 3: Clear the Mautic Cache

[](#step-3-clear-the-mautic-cache)

Run the following command to clear the cache and ensure Mautic recognizes the new plugin:

```
sudo /usr/bin/php /path-to-mautic/bin/console cache:clear
```

### Step 4: Install the Plugin

[](#step-4-install-the-plugin)

1. Navigate to the **Plugins** page in the Mautic admin panel.
2. Click the "Install/Upgrade Plugins" button to register the new plugin.

Alternatively, you can install the plugin via command line:

```
sudo /usr/bin/php /path-to-mautic/bin/console mautic:plugins:install
```

3. Go to plugins page, then click on installed plugin and enable the plugin by choosing 'Yes' option.

---

User Flow Scenario
------------------

[](#user-flow-scenario)

### Anonymous Contact Tracking

[](#anonymous-contact-tracking)

- A visitor lands on your website, which is tracked by the Mautic tracking script.
- Mautic creates an anonymous contact (e.g., Contact ID `100`) and tracks all page hits and activity under this ID.

### Email Interaction

[](#email-interaction)

- An email is sent to the same individual (Either contact is imported with email address or manually created in Mautic - this contact has email address).
- When this person clicks the link in the email (in the same browser session), Mautic identifies the individual as a known contact (e.g., Contact ID `200`) and assigns a new contact ID to the browser.

### Default Mautic Behavior

[](#default-mautic-behavior)

- With Mautic’s default behavior, the old anonymous contact (`ID 100`) retains the tracked data, while the new identified contact (`ID 200`) starts tracking separately, leaving data fragmented.

### Plugin Functionality

[](#plugin-functionality)

- With this plugin, as soon as the browser’s cookie updates to `ID 200`, the plugin merges the tracked data from the old contact (`ID 100`) into the new identified contact (`ID 200`).
- This ensures all tracking history, page hits, and custom fields are consolidated under the identified contact (`ID 200`), providing a complete view of the individual’s activity.

---

Development Details
-------------------

[](#development-details)

### Directory Structure

[](#directory-structure)

- **`Config/`**: Contains configuration files (`config.php` and `services.php`).
- **`EventListener/`**: Contains the event subscriber `InterceptPageHitsSubscriber.php` for tracking and merging contacts.
- **`Integration/`**: Contains logic for Mautic integration.
- **`Assets/`**: Contains static assets such as icons.

---

Contributors
------------

[](#contributors)

- **Iuri Jorbenadze** - [Email](mailto:jorbenadze2001@gmail.com)
- **Lenon Leite** - [Email](mailto:lenonleite@gmail.com)

---

License
-------

[](#license)

This project is licensed under the MIT License.

---

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

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.

### Community

Maintainers

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

---

Top Contributors

[![iuriJorbenadze](https://avatars.githubusercontent.com/u/90871956?v=4)](https://github.com/iuriJorbenadze "iuriJorbenadze (20 commits)")

### Embed Badge

![Health badge](/badges/iurijorbenadze-mautic-merge-anonymous-contact-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/iurijorbenadze-mautic-merge-anonymous-contact-plugin/health.svg)](https://phpackages.com/packages/iurijorbenadze-mautic-merge-anonymous-contact-plugin)
```

PHPackages © 2026

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