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:
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:
- Register in your admin account
- Navigate to the Settings section in the admin panel (You will find it in the bottom left corner of your account)
- Within the View section, click on View settings
- Within the Exclude URL Query Parameters field, write “msclkid”
- Save changes
Done! From now on, this parameter will not appear in future sessions of this view in reports.
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:
- Register in your admin account
- Navigate to your admin panel (You will find it in the bottom left corner of your account.)
- Within the account section, click on All Filters to add a new filter
- Name your Filter using the Filter Name field
- Change the filter type to Custom
- Select Search and Replace option
- Choose Request URL in the Filter Field
- 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.
- Leave the Replace String field empty.
- Save the changes
- 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”.
- Enter the following expression within the Search String field:
([?&]$)
- Leave the Replace String field empty.
- 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:
- Create another Search and Replace Filter (same procedure as before)
- 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!