Similar to fbclid, msclkid is another parameter that can mess up your Google Analytics reports. 

This article will tell you how to easily remove this parameter from your GA reports to ensure smooth and effortless data analysis.

What is the msclkid parameter and how does it affect your analytics?

The msclkid parameter is the click identificator that is automatically added by Microsoft Advertising to your link’s URLs.

MSCLKID stands for Microsoft Click Identifier

And although it doesn’t seem so bad at first sight, having this parameter in your Google Analytics report might lead to troubles when you start analyzing your data. Why is that? 

This parameter creates duplicate lines in Google Analytics Reports, which makes a lot of hassle when it comes to data analysis.

But good news! You can easily prevent this from happening.

There are two easy ways how you can remove the msclkid parameter from your reports:

  1. By changing your View Settings
  2. By applying filters

Let’s have a look at both options.

How to exclude the msclkid parameter from your GA reports by changing your View settings?

The first way is to change Google Analytics configurations. 

Here are the five easy steps you need to follow to exclude it:

  1. Register in your admin account
  2. Navigate to the Settings section in the admin panel (You will find it in the bottom left corner of your account)
  3. Within the View section, click on View settings
  4. Within the Exclude URL Query Parameters field, write “msclkid”
  5. Save changes

Done! From now on, this parameter will not appear in future sessions of this view in reports. 

how-to-remove-msclkid-from-google-analytics

As you can see, we’ve already taken care of the Facebook parameter (fbclid), which is why it is now included here. To add more parameters, simply add them one by one using a comma in between the values.

If you have several views, do not forget to configure this setting for each of them.

How to exclude the msclkid parameter from your GA reports by applying filters?

Another way is applying filters. 

Note: This method is more suitable for those companies who have several views in their Google account since it allows them to make necessary changes in multiple views at once. 

Here is what you need to do to exclude the msclkid parameter:

  1. Register in your admin account
  2. Navigate to your admin panel (You will find it in the bottom left corner of your account.)
  3. Within the account section, click on All Filters to add a new filter
  4. Name your Filter using the Filter Name field
  5. Change the filter type to Custom
  6. Select Search and Replace option
  7. Choose Request URL in the Filter Field
  8. To remove the msclkid parameter from all of your pages, enter the following expression within the Search String:

(((msclkid)(=[^&#]*))+)

*This Filter will help you clean up your data and get rid of the msclkid parameter and a couple of others that mess up your analytics. 

  1. Leave the Replace String field empty.
  2. Save the changes
  3. Create another Filter: repeat steps 4-7 for this new Filter

*As soon as you create this Filter, you need to set up a so-called “clean-up” filter that will help to exclude the “?” or “&.”. You can simply name it “Clean-up filter”.

  1. Enter the following expression within the Search String field:

([?&]$)

  1. Leave the Replace String field empty.
  2. Ensure that your “Clean-up” Filter ranks below all your query filters.

Don’t forget that you can also remove all unnecessary URL queries by simply applying one Filter:

  1. Create another Search and Replace Filter (same procedure as before)
  2. Enter the following expression within the Search String field:

\?.*

This Filter will help you remove everything that comes after the first “?” in the page path.

Summary

To sum up, there are two easy ways to remove the msclkid parameter from your Google Analytics: 1) by changing View settings, and 2) by applying Filters. 

We hope this was helpful, and your reporting will be much smoother from now on!

Wondering how to remove annoying fbclid parameter from your GA reports for good? Find out here!

Was this post helpful?