In order to gather insights and begin optimizing your conversion rate, you need to install the Mouseflow tracking code on your site. Drupal is one of the most popular open-source content management systems available, in this article we will guide you through the few steps involved in installing the Mouseflow tracking code on your Drupal site using Google Tag Manager. 

Step 1: Log in to Mouseflow

Begin by logging into Mouseflow and clicking the </> symbol to open up the Tracking Code you will need.

Click the Copy to Clipboard button to save the Tracking Code. 

You will need this in step 3.

Step 2: Get the Google TagManager Module and install it on your Drupal site

This step is only necessary if you don’t already have the module installed, if you have it already, please skip ahead to step 4.

Please follow the directions applicable to your particular version and branch of Drupal from the module description here.

Copy the URL for the appropriate file for your version of Drupal

Log into your Drupal project account as an admin and from the dashboard click Extend.

Paste the URL for the Google TagManager module into the Install from a URL field and click Install.

When installation has completed, enable the module.

Step 3: Log in to Mouseflow

Once you have signed up and logged in to your Mouseflow account, you will be ready to begin.

Navigate to the Website Settings by clicking the gear icon.

and copy the Website ID.

Step 4: Go to Google Tag Manager

Log into Google Tag Manager and make sure you have selected the account associated with the site you want to install Mouseflow on.

Navigate to Tags and click New.

Change the name of the new tag from Untitled Tag to Mouseflow (or something else that makes sense to you).

Hover over the Tag Configuration box and click the pencil icon.

Here will be a list of all available tags, the easiest way to select the Mouseflow tag is to search for it and click it.

In the Project ID field paste the Website ID you copied from your Mouseflow settings page.

Hover over the Triggering box and click the pencil icon. Select the All Pages option and Save.

To complete the configuration in Google Tag Manager, click the Submit button, you can add details relevant to this version if you want, remember to save.
When you're ready to submit the changes to your site, click the Publish button.

Step 5: Test Installation and Activate Tracking


Once you have completed adding the Mouseflow Tracking Code to your site you should refresh one of the pages that the code is on, this will let Mouseflow know that the installation has been made.

To begin recording traffic on your site, you need to activate tracking by clicking the Activate Tracking button from the 

Manage My Sites page.
You confirm that you will abide by Mouseflow terms and not collect Personal Identifiable Information (PII) by signing your name and clicking the button.

Tip: If you are not seeing the Activate Recording button (or popup) at this point, please try to visit your site in your browser's Private or Incognito mode, and do some clicking, scrolling and navigating while you're there.

Once you have activated tracking, Mouseflow will automatically begin recording your visitors. You can check the Recording Status from the Manage My Sites page or you can click the play button to go to your Dashboard.

Congratulations! You Made it!


Now go celebrate with your team while the insights pour in.

What's Next?

Once you're done celebrating here are a few next steps to consider.