ℹ️

How to track WordPress categories and tags

When you use Friendly Automate's website tracking, pages visited are stored in the "History" for each of your contacts:

image

You can use this information to target contacts who are interested in certain topics or are at a certain point in their customer journey.

However, if you have a blog with a lot of content, this quickly becomes overwhelming. After all, you don't want to define the topics for thousands of individual pages in Friendly Automate.

Fortunately, good CMS systems like WordPress offer a remedy here. WordPress requires you to assign at least one category to each blog post. Furthermore, you can add as many tags as you want to each post in WordPress.

You can take advantage of this information in Friendly Automate.

By default, Friendly Automate's tracking code "only" captures the URL and title of a page. However, if you add a small code snippet to your WordPress theme, you will automatically capture the categories and tags from WordPress within Mautic.

Friendly Automate will then display them as "tags" for each contact:

image

You can then use these tags to target contacts who are interested in certain topics. For this you can use the tag filter in segments:

image

Here you can now select the WordPress categories and tags of the blogposts your contacts have visited!

image

How do you set up tracking of WordPress categories and tags?

You can set up this advanced tracking in two easy steps.

1. Make sure that the official Mautic plugin for WordPress is installed

image

Here you can find instructions on how to install the plugin:

🗺️Install the WordPress plugin for the Automate tracking

2. Add the following code to your WordPress theme

Go to the directory of your active WordPress theme. It is located in the subfolder "wp-content/themes/" of your WordPress installation.

There should be a file called "functions.php". If this file does not exist, create a new file with this name. It is important that the content of this file starts with "<?php".

Now add the following code to the functions.php:

Done :)

Visitors to your WordPress website should now automatically have WordPress categories and tags assigned as tags in Friendly Automate.

🙂
Any questions? We are happy to help you via 📧 email or ☎️ phone.

Don’t have time? 👩‍💻 Contact us and we’ll implement and design for you.