---
title: "WordPress plugin setup"
date: "2024-02-14T06:18:38+00:00"
summary: "Easily integrate Campaign Studio with WordPress using the WP Mautic plugin. Track visitor activity, add dynamic content, and personalize web experiences for enhanced marketing effectiveness."
image:
type: "page"
url: "/campaign-studio/wordpress-plugin-setup"
id: "a3910745-4494-4dc2-a6d7-778e99bbe159"
---

The WordPress plugin for Campaign Studio enables marketers to track a contact’s activity on organizational websites. It also helps marketers add content and personalize the web experience with communication channels.

The [WP Mautic](https://wordpress.org/plugins/wp-mautic/) plugin is open source, built and supported by the Campaign Studio community.

Adding the WP Mautic plugin
---------------------------

Whether you’re using WordPress.com or WordPress.org, you can add the plugin to connect with Campaign Studio.

1.  In your WordPress admin panel, go to the **Plugins** section.
    
2.  Search for **WP Mautic**.
    
    ![Wordpress](https://acquia.widen.net/content/qr8m8wnomx/jpeg/campaign-studio_wordpress.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
3.  Install the plugin.
    
4.  Navigate to the **Settings** page.
    
    ![Configuring wordpress page](https://acquia.widen.net/content/bdxo8tbasw/jpeg/campaign-studio_configuring-wordpress.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
5.  Update the following settings:
    
    *   **Mautic URL**: Add your Campaign Studio URL. If you have a custom domain, use that (`subdomain.yourdomain.com` instead of `yourcompany.mautic.net`).
        
    *   **Tracking script location**: Select the appropriate radio button to include tracking script in the header or the footer of the page. Acquia recommends adding tracking scripts in the footer, as tracking scripts in the header can slow page loads and hamper the user experience.
        
    *   **Tracking image**: If a website visitor has JavaScript disabled, Campaign Studio can add a tracking image.
        
    *   **Logged user**: To track user activity (you and your team) while you’re signed in to Campaign Studio, select this checkbox. Acquia recommends deselecting it, because you’re reviewing and testing your page. Using this option may inflate your traffic statistics. When deselected, you must use an incognito window or different browser to test actions in Campaign Studio.
        
6.  Click **Save**.
    

WordPress adds the Campaign Studio tracking code to all pages on the website. You can connect the same Campaign Studio instance to many WordPress websites, but only use one Campaign Studio instance per website. To add the tracking code for other Campaign Studio instances, copy the from the **Configuration > Tracking Settings** section of the **Settings** panel and paste it in to the website header or footer.

Shortcodes for content
----------------------

Once you’ve connected your Campaign Studio instance and WordPress website, you can add content. The plugin enables shortcodes to add dynamic web content, focus items, forms, and gated video to your website. You can add or remove tags to and from contact records based on which pages a contact visits.

For each of these codes, replace `ID#` with the ID number of the item. You can find this in the far right column on the item list in your Campaign Studio instance.

**Dynamic Web Content**:

    [mautic type="content" slot="slot_name"] {Insert Default Content here}
    [/mautic]

Inserting default content ensures that the contact sees something in the slot, even if they weren’t tracked before or they don’t meet the criteria for your Dynamic Content slot.

**Focus Item**:

    [mautic type="focus" id="ID#"]

**Form**:

    [mautic type="form" id="ID#"]

If you prefer to use your own forms that are already in place, you can pass the data back to Campaign Studio forms through API. Using the [PHP form library](https://github.com/escopecz/mautic-form-submit) , you can also cookie the contact on form submission to begin tracking. If you don’t use the PHP form library, contacts won’t be tracked after submitting your non-Campaign Studio forms.

**Gated Video**:

    [mautic type="video" gate-time="Xseconds" form-id="ID#" src="URL"]

In this shortcode, the `ID#` applies to the form you’d like to use since there’s no Gated Video item in Campaign Studio.

For the gate-time, enter the time (in seconds) after which you’d like the form to display. This may be right at the beginning, so the visitor can’t see any part of the video until you’ve collected some data from them. You may want it at the end, after the visitor has watched the entire video. Or, you may gate the video after a short period to hook the visitor and require them to exchange some information for access to the rest of the video.

Test the form to ensure it fits inside the video. The form may need to change styling for the fields or submit button.

The `URL` for the source may be a link from YouTube, Vimeo, Wistia, or other service. To add an `.mp4` file, use the full URL of the file location.

You may also add a video and track views on a contact record without gating. Remove the `gate-time` and `form-id` parts of the shortcode to remove the gate.

**Tags**:

    [mautic type="tags" values="tag1, tag2, -tag3"]

Add any tags you’d like to add in place of `tag1` or `tag2`, separated by a comma. To remove a possible existing tag on a contact record, include `-` before the tag name.