Information for: DEVELOPERS   PARTNERS

Installing the Campaign Studio Drupal module

The Drupal module for Campaign Studio enables marketers to track contact’s activity on organizational websites. Rather than using a Campaign Studio plugin to connect Campaign Studio and Drupal, you’ll use a Drupal module.

Drupal 8

  1. Download the Campaign Studio module for Drupal 8.x.
  2. Install the module using Composer.
  3. In the module configuration, enter your Mautic URL. If you’re using a custom domain, be sure to use the URL with the custom domain (https://subdomain.yourdomain.com) rather than Campaign Studio’s default domain (https://yourcompany.mautic.net).
  4. To exclude pages from tracking with Campaign Studio, select Every page except the listed pages.
  5. List the pages in the text box.
  6. Click Save.

Drupal Module - D8 Mautic Module Configuration

Adding forms in Drupal 8

To add a Campaign Studio form to a Drupal 8.x page, you can:

Drupal 7

  1. Download the Campaign Studio module for Drupal 7.x
  2. Install and enable the module.
  3. Configure the module by entering your Campaign Studio URL. If you’re using a custom domain, be sure to use the URL with that custom domain (https://subdomain.yourdomain.com) rather than Campaign Studio’s default domain (https://yourcompany.mautic.net).
  4. Go to Structure > Blocks and drag the Campaign Studio block to the footer. This adds the Campaign Studio tracking script to every page on your website.

Once you’ve configured the Campaign Studio module, you can use shortcode to add Campaign Studio forms to your Drupal 7.x website. Use the shortcode:

{mauticform id=ID# width=300px height=300px}

Where ``ID#`` is the Campaign Studio form ID, which you can find in the form
list or at the end of the URL for the form when you're editing it in
Campaign Studio. Change the width and height to match the space where the
form displays on your website.