Good marketing can significantly increase product awareness and sales figures. Marketing automation systems can further optimize and automate processes and expand them with new possibilities. In this article, I would like to show you how to set up the open source marketing automation system "Mautic", integrate it into TYPO3 and use its features accordingly.
What is marketing automation?
Marketing automation refers to software platforms for the automation of lead generation, administration and measurement as well as the management and tracking of visitors and advertising campaigns. Marketing automation helps to identify potential customers among the visitors to a website, to evaluate them (scoring) and to turn these visitors into customers by providing further, specific information. This results in major advantages for marketing, such as time savings within marketing processes through automation and more efficient workflows.
Mautic - Open Source Marketing Automation
Mautic is an open source marketing automation system. There are no high license costs for Mautic - in contrast to other proprietary systems, for example. The freely accessible source code also makes it possible to adapt and expand Mautic according to your own requirements and to develop additional interfaces. Another advantage of Mautic is that it is not a cloud platform, but must be hosted on a server itself. This gives you full control over the data collected and allows you to determine where it is stored.
In addition to a freely configurable dashboard with various statistics and information, a wide range of content such as assets, emails or landing pages can be stored in Mautic, which can then be used in campaigns or forms, for example.
In Mautic, users can be evaluated using an individually configurable scoring system. Points are awarded for a user's actions, such as calling up a specific page or clicking on a document.
This scoring system then allows the system to carry out further actions automatically, e.g. sending an e-mail to the user when a certain score value is reached. In addition, users can be assigned to different categories (segments), which are then later used to display dynamic content, for example. The higher a user's score, the more interesting they are from a marketing perspective.
Further information on the features of Mautic can be found on the official website.
Installing Mautic
The installation of Mautic is relatively simple and straightforward.
First, the server must be prepared. A database must be available and the web server must be configured if Mautic is to be accessible via its own domain. If Mautic is to be created as a subfolder of a domain (e.g. www.example.de/mautic), there is no need to configure the advertising server. Whether Mautic is installed on a separate server or on the same server as an existing TYPO3 site is not important. It is only important that TYPO3 and Mautic can communicate with each other.
First, Mautic must be downloaded from mautic.org and stored on the server accordingly. Alternatively, you can also clone the project from GitHub. This is particularly useful if you want to make adjustments and extensions to Mautic. You can find detailed instructions on how to install Mautic in the official documentation.
When Mautic is started for the first time, a system check is carried out. Here you will receive information and warnings about incorrect configurations or missing system requirements. If everything is OK here, simply follow the further steps of the installation wizard to set up Mautic. At the end, the system is ready and you can log in to the Mautic backend with the admin user created in the wizard.
Integration in TYPO3
To integrate Mautic into TYPO3, the following 2 extensions must be installed:
- marketing_automation(https://extensions.typo3.org/extension/marketing_automation)
- mautic(https://extensions.typo3.org/extension/mautic)
The "marketing_automation" extension forms the basis for other marketing automation extensions. It extends TYPO3, for example, with the option of creating and maintaining "personas". This is a kind of categorization for users and content and forms the basis for dynamic content.
The "mautic" extension is responsible for linking TYPO3 and Mautic and provides corresponding extensions
and content elements for communicating with Mautic. This extension is also responsible for synchronization and authentication with Mautic.
Before Mautic and TYPO3 can communicate with each other, the following steps must be carried out:
In Mautic:
- Under "Settings" => "Configuration" => "API Settings" activate the API ("API enabled?") and save
- A new item "API Credentials" appears under "Settings", create and save new credentials for "OAuth 1.0a" using the "New" button.
An entry with a generated "Public Key" and "Secret Key" should now have been created in the table; we will need these later.
In TYPO3:
- Open the settings of the "mautic" extension (TYPO3 10: Admin Tools => Settings => "Extension Configuration")
- Enter the URL under which Mautic is accessible ("Base URL")
- Enter and save the public and secret keys previously created in Mautic.
- A button "Authorize with Mautic" should now appear, click on it.
- You will now be redirected to the Mautic login, where you must log in and confirm that access is permitted.
- A green box with the success message will then be displayed in the backend instead of the button
- The fields "Access token" and "Access token secret" should now automatically have values.
- Mautic user tracking can be activated under the "Tracking" tab
Now TYPO3 and Mautic are linked and we can start using Mautic features in TYPO3.
Further details on integration and configuration can be found in the instructions for the "mautic" extension.
If the authentication does not work
The authentication of TYPO3 in Mautic is actually the only critical point that can lead to problems. There can be many reasons why authentication fails, and these depend not least on the systems used and the respective settings.
A few possible starting points for troubleshooting:
- Is Mautic accessible from TYPO3?
It must be possible to reach the Mautic server from the TYPO3 server (ping) or to call Mautic (wget, curl) - Is there additional protection for Mautic (htpasswd)?
- Do the versions of Mautic and the "mautic" extension match?
The extension uses the Mautic API Library(https://github.com/mautic/api-library) for the connection. When installing the extension, you should check which version of Mautic the API library used is for. If Mautic and the API library have different versions, there is a good chance that authentication will fail. - Is there any information in the TYPO3 and Mautic logs regarding an error?
- Does the Mautic server deliver the correct response?
Example: the extension expects a header "Mautic-Version" in the response from Mautic. However, if the server returns "mautic-version" instead, the authentication still fails because the spelling is different.
Integrating Mautic forms into TYPO3
In Mautic you have the option of creating individual forms under "Components" => "Forms". These can be simple contact forms, but also forms for offering further information as downloads (assets).
As the integration of Mautic forms in TYPO3 via HTML is not very convenient, the "mautic" extension provides its own content element "Mautic Form". The desired Mautic form is selected in the content element via a selection, which is then displayed accordingly in the frontend.
TYPO3 forms in Mautic
If you prefer to create and manage your forms in TYPO3, this is also no problem in combination with Mautic.
When creating a new form via the "Forms" backend module, all you have to do is select the "Advanced settings" checkbox. In the 2nd step, the "Mautic Form" is then available under "Form Prototype". Here you also have the option of using a sample form as a template, which already has the corresponding finishers set for Mautic. If you prefer to start with an empty form, the necessary Mautic finishers must be added at the end.
There is a new option "Mautic Property Type" for the individual fields, here you must select which field in the results list the form field should be mapped to.
When saving, the form is then automatically created in Mautic. All submissions of the form are then saved and managed accordingly in Mautic.
Converting existing forms into Mautic forms is unfortunately a little more complicated. The YAML configuration of the form would have to be adapted manually in many places and the Mautic form would first have to be created manually in Mautic. Here it can make sense to create the desired form again in the "Form" backend module, but then as a Mautic form.
Dynamic content in TYPO3
The scoring in Mautic has already been mentioned above. Mautic allows us to award points based on certain activities of a visitor, whereby you are not only limited to adding points, you can also award negative points.
Under "Points" => "Manage Actions", the desired actions can be defined in Mautic and awarded points. Possible actions include submitting a form, calling up a specific page or downloading an asset.
Also under "Points" we find the menu item "Manage Triggers", here you define actions that are carried out when a user has reached or exceeded a certain point value. For example, you can assign a user directly to a specific segment here.
But what are segments? Segments are a kind of categorization or classification of the contacts registered in Mautic. If a user fulfills certain conditions, they can be assigned to a segment. This makes it possible, for example, to differentiate whether a contact has the potential to make a purchase or not. When Mautic is fully configured, the assignment of contacts to segments happens automatically in the background.
Further information on segments can be found in the Mautic documentation.
For Dynamic Content to work in TYPO3, "personas" data records must first be created via the list module. In a personas record, you will find a list of the segments created in Mautic and can link a Mautic segment to a TYPO3 persona by selecting it.
In content elements and pages, you will now find a new selection "Only for applicable personas" on the "Access" tab. This field works in the same way as the field for user groups, we can control here which content should be visible for which personas or even if no persona is set for a user.
If a contact returns to the page and is assigned to a corresponding segment in Mautic, they will be shown the content that interests them.
For further information and features, it is worth taking a look at the instructions for the "mautic" extension.