# Drupal module - Advanced Mautic Integration

**URL:** <https://forum.mautic.org/t/drupal-module-advanced-mautic-integration/30177>\
**Category:** 3rd Party Addons\
**Tags:** development\
**Created:** [December 12, 2023, 8:27am UTC](https://forum.mautic.org/t/drupal-module-advanced-mautic-integration/30177 "2023-12-12T08:27:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpietrzak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gpietrzak/32/11043_2.png) [@gpietrzak](https://forum.mautic.org/u/gpietrzak)\
**Post date:** [December 12, 2023, 8:27am UTC](https://forum.mautic.org/t/drupal-module-advanced-mautic-integration/30177/1 "2023-12-12T08:27:15Z")

</div>

Hi, I’ve just released a beta version of Advanced Mautic Integration for Drupal 10. It is inspired by the Google Analytics and GTM modules and offers advanced tracking and Mautic API support.

[https://www.drupal.org/project/advanced\_mautic\_integration](https://www.drupal.org/project/advanced_mautic_integration)

## The key features are:

- **Embedding mtc.js** - putting the Mautic script into page attachments.
- **Tracking pageviews** - enable/disable tracking page visits.
- **Tracking outbound links** - `pageview` event for external links.
- **Tracking mail links** - `pageview` event for links like `mailto:someone@example.com`.
- **Tracking phone links** - `pageview` event for links like `tel:123456`.
- **Tracking downloads** - `pageview` event for links to selected file types.
- **Adding lead parameters** - an ability to send additional data with `pageview` requests. For example - you can send the current user’s e-mail to identify anonymous contacts in Mautic. Tokens can be used here (the module takes care of the additional cache dependencies coming from the token’s contexts).
- **Adjusting script location** - the module uses the Condition API to let you choose where the script should be visible. It works similar to block settings. You can track only relevant pages and save a lot of resources.
- **Wrapping API library** - the module acts as a wrapper for the [Mautic API library](https://github.com/mautic/api-library). It provides basic configuration (endpoint, credentials for Basic Auth) and allows to use API in your own code.
- **Synchronizing Drupal users with Mautic leads** - send Drupal profile data to Mautic while respecting the `mtc_id` cookie.

If you have any ideas for the future functionalities, please add them to the [issue queue](https://www.drupal.org/project/issues/advanced_mautic_integration?categories=All), I will be happy to consider developing them.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [December 12, 2023, 12:00pm UTC](https://forum.mautic.org/t/drupal-module-advanced-mautic-integration/30177/2 "2023-12-12T12:00:36Z")

</div>

That’s great, thanks for sharing @gpietrzak 🚀
