Mautic Wordpress Plugin injects Mautic tracking script and image in the WP website. Your Mautic instance will be able to track information about your …
MauticWordPress Plugin injects Mautic tracking script and image in the WP website. Your Mautic instance will be able to track information about your visitors. You can also insert Mautic content inside your website using different shortcodes.
Once installed, the plugin must appared in your plugin list :
And that’s it !
Tracking script works right after you finish the configuration steps. That means it will insert the mtc.js
script from your Mautic instance. You can check HTML source code (CTRL + U) of your WP website to make sure the plugin works. You should be able to find something like this:
<script> (function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n; w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t), m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m) })(window,document,'script','http://yourmauticsite.com/mtc.js','mt'); wpmautic_send(); </script>
If you need to send custom attributes within Mautic events, you can use the wpmautic_tracking_attributes
filter.
add_filter('wpmautic_tracking_attributes', function($attrs) { $attrs['preferred_locale'] = $customVar; return $attrs; });
The returned attributes will be added to Mautic payload.
To load a Mautic Form to your WP post, insert this shortcode to the place you want the form to appear:
[mautic type="form" id="1"]
Replace “1” with the form ID you want to load. To get the ID of the form, go to your Mautic, open the form detail and look at the URL. The ID is right there. For example in this URL: http://yourmautic.com/s/forms/view/3 the ID is 3.
To load a Mautic Focus to your post, insert this shortcode to the place you want the form to appear:
[mautic type="focus" id="1"]
Replace “1” with the focus ID you want to load. To get the ID of the focus, go to your Mautic, open the focus detail and look at the URL. The ID is right there. For example in this URL: http://yourmautic.com/s/focus/3.js the ID is 3.
To load dynamic content into your WP content, insert this shortcode where you’d like it to appear:
[mautic type="content" slot="slot_name"]Default content to display in case of error or unknown contact.[/mautic]
Replace the “slot_name” with the slot name you’d like to load. This corresponds to the slot name you defined when building your campaign and adding the “Request Dynamic Content” contact decision.
Mautic supports gated videos with Youtube, Vimeo, and MP4 as sources.
To load gated videos into your WP content, insert this shortcode where you’d like it to appear:
[mautic type="video" gate-time="#" form-id="#" src="URL"] [mautic type="video" src="URL"]
Replace the # signs with the appropriate number. For gate-time, enter the time (in seconds) where you want to pause the video and show the mautic form. For form-id, enter the id of the mautic form that you’d like to display as the gate. Replace URL with the browser URL to view the video. In the case of Youtube or Vimeo, you can simply use the URL as it appears in your address bar when viewing the video normally on the providing website. For MP4 videos, enter the full http URL to the MP4 file on the server.
Since the Mautic v2.9.1 release, the form-id is not mandatory anymore, mautic video can be tracked.
You can add or remove multiple lead tags on specific pages using commas. To remove an tag you have to use minus “-” signal before tag name:
[mautic type="tags" values="mytag,anothertag,-removetag"]
Mautic – WordPress plugin is listed in the in the official WordPress plugin repository. That makes it very easy to install it directly form WP administration.
If the installation via official WP plugin repository doesn’t work for you, follow these steps:
Release date: 2020-12-14
Release date: 2020-12-14
<noscript>
image that can be handled with WPRelease date: 2020-09-28
wpmautic_send
javascript function that can be called byRelease date: 2020-03-09
plugin_action_links
named call which to the filter to never being called.Release date: 2020-03-09
Release date: 2020-02-20
Added
script_location
value to disable script rendering on page load (GDPR compliance).Changes
Release date: 2017-11-13
Release date: 2017-08-24
Release date: 2017-08-07
Release date: 2017-07-19
Release date: 2017-07-19
Added
wpmautic_get_tracking_attributes
which defines attributes to be sent through JS and Image trackers.wpmautic_tracking_attributes
to allow developers injecting custom attributes in trackers.Changed
Release date: 2017-06-03
document.write
.Release date: 2017-06-02
Release date: 2017-06-02
Added
Changed
Release date: 2017-05-25
Release date: 2017-05-25
Added
Changed
Release date: 2017-05-06
Added
Changed
Release date: 2015-11-05
Release date: 2015-03-02