My score website on gtmetrix is A. When I add facebook pixel code, the scrore is B

Look at this :

enter image description here

enter image description here

How can I solve this problem?

I want to add the Facebook pixel code on my website, but I don't want it to reduce the score

  • DO NOT post images of code, data, error messages, etc. - copy or type the text into the question.
    – Rob
    May 16, 2020 at 11:51

2 Answers 2


To answer your questions:

Why adding facebook pixel code reduces the score on gtmetrix?

The reason the Facebook pixel reduces your GTMetrix score is because it is an additional script with a short caching time, and GTMetrix's algorithms give better scores when you have fewer scripts and they have longer caching times.

How can I solve this problem?

Having a "B" score with GTMetrix is not a problem, since GTMetrix is an artificial measurement that only loosely correlates with actual page speed in practice.

I want to add the Facebook pixel code on my website, but I don't want it to reduce the score

The solution to this is to prevent it from blocking page rendering by including it before the end of your body tag instead of in the head tag. This has tradeoffs, however, as it's more likely to be blocked or to not get the chance to finish loading before the user navigates away from the page.

I would not recommend doing this, as it may negatively impact your site. I think it makes much more sense to just be okay with the "B" rating on GTMetrix.

  • Great answer. I read some references that say that Facebook pixel code can be placed in Google Analytics. Maybe this is a good solution because I don't need to placed the facebook pixel script on the head tag. But I just put it on google analytics. Seems that this will not reduce the score on gtmetrix May 16, 2020 at 23:13
  • @SuccessMan I haven't ever heard of Facebook Pixel being able to be placed in Google Analytics. Maybe there's something I don't know about this, or maybe you are confusing it with Google Tag Manager. May 17, 2020 at 0:43
  • I'm sorry. I mean Facebook Pixel placed in Google Tag Manager. May 17, 2020 at 1:19
  • I want to ask. I have added the Google Analytics script to my website. If I want to use Google Tag Manager, do I need to add the Google Tag Manager script again to my website? or not necessary because I already use google analytics? May 17, 2020 at 1:21
  • I'm not sure, but Tag Manager is just a way to manage tags. It won't make the page load any faster than just including your scripts manually, it's just a tool to help organize them and include them automatically. May 17, 2020 at 1:51

Have you checked the loading time of your site with and without Facebook pixel? Isnt't that the problem? If you check this WP Rocket article, it also mentions that such tracking methods can have effect on site speed, thus cause worst grade on metric sites: https://wp-rocket.me/blog/how-third-party-tags-and-trackers-impact-website-performance/

If we are talking about SEO effects, adding a SEO pixel has advantages as well. For example, the Moz Spam Score is calculated by using 27 factors, and one of them is this:

19. Facebook Pixel The Facebook tracking pixel is almost never present on spam sites.


So, I don't see any problem to use the Facebook pixel, if it doesn't slow down your site. But I belive it does not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.