Mautic Best Practices Checklist For A Successful Campaign Management

Overview

The primary objective of this blog post is to provide you a frame of reference for further investigation, demonstrate our expertise, thought leadership, and thoroughness. We hope this checklist helps you to optimize and scale your Mautic setup to more easily manage campaigns.

Mautic Hosting Infrastructure

Selecting the appropriate infrastructure from this range depends on a variety of items, but primarily:

  • Pre-existing infrastructure, as Mautic is deployed to interact with the rest of your enterprise web application.
  • Team resources capable of supporting various technologies. For instance, I wouldn't recommend deploying to Kubernetes unless it's your bread and butter.
  • Scalability and performance targets.
  • Requirements to customize Mautic and deploy your own custom plugins (which isn't supported on Mautic.com, last we checked).
  • Mautic-tuned Hosting Provider?
    • Mautic.com
      • This makes sense if you're trying out Mautic for the first time and don't want to get your hands dirty maintaining the back-end.
      • You can also rest assured that the version of Mautic deployed on Mautic.com is likely to be the most stable and thoroughly tested.
      • Cons
        • No support for custom Mautic plugins.
        • No direct database access.
    • Platform.sh
      • Platform.sh provides a ready-to-deploy Mautic template. One-click and you're done.
      • Fully-equipped with a high availability architecture, easy configuration of RabbitMQ, and a separate MariaDB back-end outside of the PHP application servers.
    • Mautic Kubernetes (K8s)

      Facet has spent extensive time developing a Mautic K8s distribution, leveraging the best practices of high availability architecture to implement a scalable Mautic instance, with multiple pods per critical infrastructure component.

      Mautic-k8s includes ability to:

      • Deploy a stateless Mautic PHP application server in cluster
      • Store persistent cache and media directories to a shared Persistent Volume Cache (PVC)
      • Stream logs off the pods to a separate Elastic Fluentd Kibana (EFK) stack, wherein the full set of logs can be easily parsed.
      • Deploy stateful RabbitMQ in a High Availability (HA) cluster format. Since RabbitMQ is responsible for the sequential processing of email transactions, we want failure redundancy to be as high as possible.
      • Environment-variable injection of appropriate infrastructure configuration, parametrizing the deployment configuration appropriately to the config_local.php, parameters_local.php, and paths_local.php files.
      • Terraform deployment to AWS, assuming an AWS EKS - Managed Kubernetes back-end, and AWS RDS instance.

        NOTE:
        Don't worry, it's one of our @TODOs to convert this to use other forms of Kubernetes deployments and make this cloud vendor agnostic.

      • @TODO - Parametrize the Deployment of S3 Media Plugin in Mautic with an environment variable.
        • Currently, the Symfony Plugin Service container allows for no way of injecting an environment variable into the Mautic S3 Media Plugin. This is caused by the Mautic Plugin data being exclusively stored in the database, and there being no method for code-override.
    • Mautic Docker
      • We don't typically recommend the open source Mautic Docker project as it is not structured for high availability, is not configured for environment variable injection, and generally provides only an entry-level way to get up to speed with Mautic.
      • Since the database is deployed within the Docker image itself, and there is no supported way of parametrizing the connection to a database outside of the Docker container—please be very careful about persisting backups outside of the container for your MariaDB.
  • Scalable Mautic Deployment?

    Mautic hosting infrastructure should offer, ideally, an appropriately sized Mautic instance capable of scaling against your projected needs. There are 4 main ways that a Mautic instance will scale over time:

    • Database
      • Of which, contacts, emails, and tracking pixel events are the most cumbersome.
    • Tracking Pixel Traffic
      • Specifically throughput for calls back to the Mautic instance from the browsing experience of end-customers on various properties.
    • Media Storage

Mautic Local Development

  • Lando Configuration Setup
    • Setup .env from .env.lando.dist
    • Mailhog Mail Proxy to ensure no emails are being sent from local SMTP
  • Import Database
    lando db-import ./path/to/mariadb.sql.gz
  • Development Environment Variables
    • Email Credentials - Make sure your development environment variables leverage sandbox-only sending, meaning emails can only be sent to authorized internal domains. Do the same with SMS sending credentials. If you're sending via mailhog you may want to switch from the Amazon SES or API-connected services to Other SMTP.

Mautic Security

How to Apply Mautic Security Updates via Git

Mautic typically requires that we be able to apply micro-updates via git in between releases, sometimes where a critical Pull Request must be applied to our build before the next release goes out.

In order to more easily manage the development workflow, we setup our Mautic projects using multiple git origins, using the Mautic open source project on GitHub as an upstream to source these micro-changes from.

  • Add the Mautic upstream to your version control
git add upstream 
  • Merge upstream master or staging depending on whether you want stable or edge releases
  • To keep staging branch clear we recommend applying all of your development to a separate dev or develop branch per standard git flow.
# stage updates
git checkout staging
# pull from upstream git pull --ff-only upstream staging
# push to origin
git push origin staging

In our workflow we would create a Merge Request here in GitLab for staging against master so we can do a code review. Otherwise you can merge to master after testing locally.

git checkout master
git pull origin master
# merge with a merge commit
git merge --no-ff staging 
  • Deploy based off of git tags, never use master unless you're opting for a CI/CD pipeline to confirm your builds.
  • After deploy to your production environment, run the following commands:
cd /path/to/docroot
# delete the cache folder manually to avoid any errors with console
rm -rf app/cache/prod
# Run composer install unless it's handled in your CI/CD pipeline
composer install
# run the doctrine migrations
php app/console doctrine:migrations:migrate
# re-generate static assets
php app/console mautic:assets:generate
# run the cache delete using console so the cache automatically regenerates
php app/console cache:clear 

How to Block Country IP Ranges

Mautic allows you to block Country IP ranges from tracking within the administrative UI. This is important to setup, as you don't want to needlessly create new leads in your database (contact records) which map to junk. We all know that bots are constantly scraping the web, so try to be as exclusive as possible with the IP ranges you're tracking and you'll save yourself from the pain of Mautic database growing too quickly.

How to Setup MaxMind Database

NOTE:
We copied the following instructions from the official Mautic documentation on Maxmind licensing & setup.

From the 2.16 release, Mautic has supported using a license key to access the Maxmind IP lookup service.

Follow these steps to configure your Mautic instance to use the license key.

  1. Create a MaxMind account by going to Maxmind Signup
  1. After signup, check your email and click on access your Maxmind Account.
  1. Click on the Contact icon at the top right of the menu to login
  1. After logging in, under services click on "My License Key" on the left hand side in the menu 
  2. Then, Click on Generate new License Key 
  3. Answer "Will this key be used for GeoIP Update?" with No and confirm 
  1. Copy the license key that you see on the screen 
  1. Go to Mautic > Settings > Configuration > System Settings > Miscellaneous Settings and enter the license key into the "IP lookup service authentication" field 
  1. Click "Fetch IP Lookup Data Store". This will download the IP lookup database to your Mautic instance.
  1. Set up the cron job to periodically download a fresh copy.

How to secure Mautic Login on Production

The most effective way to secure your Mautic Login is to setup a Firewall in Cloudflare (assuming you're managing your DNS and CDN with Cloudflare), such that the following routes are protected to IP ranges only you our your team can access via VPN:

  • /s/login
  • /s/dashboard

@ToDo - Provide instructions on Cloudflare DNS + SSL Setup

Unfortunately, setting up Mautic with Cloudflare DNS Proxy is a bit of a pain, as you have to ensure tracking pixel data as well as form submissions are not blocked or proxied. Perhaps an article for another time.

Consider the following resources for Cloudflare SSL configuration and DNS setup:

Mautic Email

Mautic Email Plugins

  • Mautic Advanced Templates Bundle
    • Allows you to use Twig in email content such that your email can be preprocessed at the time of send and perform more advanced display logic.

Mautic Forms

How to set up Progressive Profiling with Mautic Forms

Mautic supports prepopulating the form with any relevant contact data as identified from the cookie, just make sure that Show when value exists is checked under Behavior tab.

Mautic Properties Setup

Mautic Segmentation Setup

Segment strategy is critical to every business, to get started you have to ask yourself some questions:

  1. Who are my customers?
  1. If I were to have a conversation with each of my customers, how does my tone and language used change depending on their segment?
  1. Can I feasibly service so many different segments or do I have to lump similar segments together?

At Facet, we use the following segments for our core newsletter audience. There are many ways we can achieve personalization based on the Industry or Persona or Orgonza, however we like to segment our audience based on how familiar and personal our relationship is with that contact. Essentially we have warmth-based segments:

Hot

  • Customers
  • Partners
  • Personal
  • VIPs

Warm

  • Past Clients
  • Vendors

Cool

  • Prospects
  • References
  • Talent
  • everybody else → Subscribers

Do Not Contact

  • DNC
  • Staff NA - people who work at companies who are not targeted buyers of our services, but who get vacuumed up into our marketing engine.

Thanks to tools like Mautic Advanced Email Templates Bundle, we can use Twig in order to ensure our content is relevant based on, say, their interest in Drupal, Mautic, or Analytics. However, we find that the tone widely varies based on whether a contact has become a Client, a personal relationship, or somewhere in between.

Mautic Categories Setup

In Mautic, Global Categories are the categories of updates your contacts can manage their Subscription Preferences against. That means, whenever someone clicks unsubscribe, they will see the list of your Global Categories. All of the other Type specific categories (Email, Form, Page, Asset) are meant for internal organization purposes.

At Facet, we really only have two categories:

  • Newsletter. A personalized email newsletter we send out monthly or bi-monthly.
  • #good-read Digest. A digest of the best articles and discussions from our internal Slack #good-read channel.

Mautic Custom Properties

With each deployment of Mautic we have some standard fields we typically add the following custom fields:

  • Account Source - Where did this Account come from? Lead Form, Apollo, Prospecting, etc.
  • CRM Last Deal Amount
  • CRM Last Updated Date
  • CRM Last Contacted
  • Double Opt-In** - A boolean (TRUE/FALSE) to track whether someone double opted-in after receiving your confirmation sign-up email. Typically requires custom implementation in Mautic.

NOTE:
** Mautic does not ship with a Double Opt-in field out-of-the-box, make sure you add one and setup the appropriate campaign workflow to get started. You will need this to be compliant with any email sending service, so it is a good first project to learn how to set up campaigns, segments, and understand the inner workings of Mautic!

  • Domain - A clean version of the root domain of the contact, we use it for easier management of company relationships.
  • Industry - An industry specification, typically provided by third-party data enrichment services.
  • Interests
  • Lead Source - How did we acquire this contact in our database? CRM, Form, Apollo, etc.
  • Lead Status -
  • LinkedIn
  • Orgonza
    • Facet uses Orgonza in order to group audience members into similar groups and communicate relative content. Our list is based off of areas that we communicate, or areas that we want to signify a group whom we won't communicate with.
      • Aerospace
      • Automotive
      • Cosmetics
      • Digital Agency
      • E-Commerce
      • Engineering
      • Finance
      • Food / Drinks
      • Government - Federal
      • Government - Local
      • Government - State
      • Higher Education
      • Information Technology
      • Insurance
      • Manufacturing
      • Media / Entertainment
      • Nonprofit
      • Product Dev Agency
      • Professional Services
      • Real Estate / Property Management
      • Retail
      • SaaS
      • Startup
      • Systems Integrator
      • Technical Agency
  • Persona - Personas are your identified roles of prospective companies you want to engage with.
    • Below is a list of our Personas, a few have special meaning but we generally stick to a combination of Role + Decision Level (DM or DI).
      • DM - A Decision Maker typically has buying and executing power.
      • DI - A Decision Influencer typically has no buying or executing power.
    • In addition to the roles, we also have some special Personas which signify a relationship that is unique to our hiring or events management processes.
      • Hiring Personas:
        • Talent
        • Reference
        • Delineating these personas helps us to communicate or exclude people we may only be talking to through the hiring process.
      • Events Management:
        • Venue DM
        • Sponsor DI
        • Sponsor DM
    • Staff NA - We often work across a full range of individuals at any given company, so many emails make it in for staff whom we have no vested interest in marketing or selling to. These people get a Staff NA.
    • Our full list of Personas:
      • Agency DI
      • Agency DM
      • Analytics DI
      • Analytics DM
      • Connector
      • IT DM
      • Marketing DI
      • Marketing DM
      • Product DI
      • Product DM
      • Reference
      • Sales DI
      • Sales DM
      • Sales Rep
      • Sponsor DI
      • Sponsor DM
      • Staff NA
      • Talent
      • Venue DM
      • Web DM

Mautic Lead Scoring Strategy

There are many great articles on lead scoring, however it's worth noting the following point system [1]:

  • Classification = 1,000 points: This is the base buyer persona score which you will build upon to determine how sales-worthy a lead is.
  • Qualification = 100 points: Each sales-qualified trigger is worth 100 points; these customer behaviors are added to the classification score.
  • Prioritization = 1-99 points: Assign a single or double-digit point value to different priority triggers based on importance. The last two digits indicate level of priority.

Within Mautic in particular we have the following Actions and scores

  • Asset actions
    • Downloads an asset: 10
  • Email actions
    • Is sent an email: 1
    • Opens an email: 3
  • Form actions
    • Submits a form: 15
      • We specifically delineate a lead form requesting services as 50 points
  • Landing Page actions
    • Visits a landing page: N/A
    • Visits specific URL: N/A

 

With the thousands place representing the classification of a customer, the hundreds place representing the Lead Stage, and the Prioritization adding up / subtracting based on site and channel engagement; you can end up with a scoring system in one place that represents the customer identity.

NOTE:
Perhaps consider switching the Qualification and the Classification with the hundreds and thousands place so that, no matter the Classification, your most Qualified customers who are in the latest stages of the customer journey are at the top of your list.

References

  1. https://www.responsiveinboundmarketing.com/blog/6-steps-to-setting-up-a-lead-scoring-strategy

Mautic Testing Checklist

Use our Mautic Testing Checklist whenever running Mautic minor or major version updates:

Mautic Application Testing

Email Deliverability Testing

When first migrating to Mautic you may want to test your deliverability to ensure your customers are receiving high quality emails from your new open source marketing automation deployment.

You can also perform these tests as frequently as you would like (typically it's a good idea when you implement new templates or potentially breaking changes to your Mautic application that could cause regressions).

  • Check the Spam Score of the Domain
  • Look at and evaluate client-side rendering for your email templates

Mautic CI/CD

Mautic Deployments

  • Deployment Scripts / Cloud Hooks
    • Post to New Relic on Deployment (optional; if available)
    • Update Database
    • Clear Caches

    Sample bash commands:

    # Install Composer (if required)
    composer install # Rebuild Media Assets
    php app/console mautic:assets:generate # Clear the Cache
    php app/console cache:clear 

Mautic Multidev Environments

  • Set up Backfill Scripts
    • Sanitize Personally Identifiable Information (PII) for your contact list as needed.
    • Perform standard database maintenance (clearing cache tables) so that your freshly imported copy of live is not misconfigured as it relates to local.
      rm -rf app/cache/prod
      • Note that your cache directory may not be in the site root in an HA setup.
    • Prevent Developers from Sending Emails when they get a fresh database from Live
      • When working with multidev environments it is important to lock down the production environment so that it is the only one with appropriate credentials to send from the main email domain.
      • Setup a Dev Email Domain and Only allow emails to be sent to your internal email addresses for testing purposes.
      • Configure Local development and multidev environments to be forced to use these credentials, even after a backfill from a live environment.

NOTE:
This is the easiest way to ensure you're not sending unwanted emails or SMS messages. Make sure you have a separate set of credentials for your sandbox accounts on development environments.

Mautic Reporting

While Mautic has some standard reports that come out of box, it is missing some critical basics.

To get the most out of Mautic, you'll need to setup the following reports:

  • Set up Unsubscriptions & Complaints Report
  • Email Subscription Double Opt-In

Scaling Mautic

  • Email
    • Own / purchase static IP for better reputation management for email sends
    • Warm IP - Scale email sends slowly over time

Mautic 2.x Open Source Plugins You Really Should Consider

  • mautic-sql-conditions-bundle
  • mautic-custom-import-bundle
  • mautic-custom-deduplicate-bundle

Besides the above mautic-eb has a great list of Mautic 2.x plugins they have contributed over the years. You should consider raiding their list of plugins and determining what is best for you.

TheDMSGroup Mautic 2.x Plugins: https://github.com/thedmsgroup?q=mautic&type=public

At the end of the day, don't worry about implementing everything right out of the gate—just know what your options are in case you need something in the future.

What Mautic Hosting Should Look Like in the Future

We know that the above list of improvements is just a series of band-aids required for the adaptation of Mautic 2.x's monolithic application deployments. In the future we would like to see:

  • Better Mautic configuration management and export / import of Mautic configuration in the OSS community.
  • Standardized Mautic build scripts (similar to what we are used to with Drush Make) and using Composer to require Mautic as a first-class package, instead of a forked Composer project install.
  • Programmatic updates from upstream improvements to Mautic.
  • No guessing about how symlinks and persistent volume caches will impact performance on high availability deployments.

For all of these reasons, we've been using the above list to work on a Mautic K8s distribution that will allow you to deploy Mautic with Helm Charts. It's a WIP but we're almost there as of this publication. Star the project to find out when we publish!

Mautic 2.x References

The following articles were referenced while putting together this article:

  1. Facet's Ultimate Mautic Setup Guide
  1. Yosu Cadilla of Mauteam discusses Tradeoffs between running Mautic in various container technologies: https://mauteam.org/mautic/mautic-for-the-c-suite/which-is-the-best-way-to-run-mautic-for-agencies/
  1. Mautic Docker Official GitHub Repositority
  1. Platform.sh Mautic Template
  1. Autoize's Mautic Installation Guide for CentOS (2017)