Facebook Analytics can give you important information if you use Facebook Insights for Domains.It sounds easy, but difficult to configure with Load Balancer. Forget about SEO people, they are basically semi literate peoples works like robots. Our work is to use them like manual workers. But these custom high level API based integrations are out of their reach. Just ask them three basic Newton’s laws of motion. 99% will fail to say the Third Law. The UNIX experts will not come to help you, so ultimately you have fix it. The reason for this guide to Facebook Analytics for Your Website is for the webmasters who are using Cloud Servers with Load Balancers as well as those who are using various Asynchronous codes, modified the crap default Facebook Like button code for purification label by W3C.
Facebook Analytics for Your Website : Complex Things
As we practically shown before, Facebook is actually a Javascript and iframe based website. The only pure HTML parts are the header and right sided sidebar. Understanding this basic is important from various aspects. Ultimately your target is to add the Facebook API Meta Tags and using the Facebook Analytics thing. Twitter will never create problem for integration. Facebook almost never goes down as they server the most load through Javascript, images etc. static files through CDN. Now you got the answer why Twitter gets down at least once a month. It is actually the load balancer fails to serve.
Facebook Analytics for Your Website : Adding the Code Part in Facebook
This is what your SEO can do, it basically a 10 years old boy can do. Simply go to :
---
1 | https://www.facebook.com/insights/ |
While you are logged in. You will get the button :
And this step :
You can see the meta property tag, copy it and add in your head, I mean your website’s header. Hitting the Get Insights will normally fetch the data. But it will throw error in case you have Load Balancers as well as those who are using various Asynchronous codes.
Facebook Analytics for Your Website : This is What Your SEO Guy Will Never Understand
First go to this webpage :
1 |
1 | https://developers.facebook.com/tools/debug |
There are many points. If you have SSL installed, it might throw error but the count will work properly. You can forget about Facebook Analytics for Your Website, because it might not work ever. There are points, Facebook has load balancers themselves. So if this debug tool shows nothing abnormal but main website shows error (that Facebook settings page), you will definitely get it working one day.
First, find you Find Your Facebook Fan Page ID and Facebook Profile ID. If you are feeling lazy to read, the easiest method is via simple GET request :
1 | http://graph.facebook.com/<span style="color: #ff0000;">thecustomizewindows</span> |
thecustomizewindows in our case is our page ID. There are many plugins to add the Facebook meta data, all works in the same way. For Admin ID, the way is the same :
1 | http://graph.facebook.com/<span style="color: #ff0000;">doctorabhishek</span> |
Where doctorabhishek is my Facebook Admin profile vanity name. Add these and delete cache (in case of CMS like WordPress with Cache Plugin). The debug tool should show no error. Try with an inner webpage. If nothing works and throws the error ‘fb:admins’ could not be parsed as type ‘fbid’. This actually might happen due to :
- The plugin or whatever is injecting that additional code.
- There are two sets of load balancers – your and Facebooks, anyone can create this problem
- The sequence of parsing is interfering (sounds odd but its the fact for some reason), you might have to push the meta up.
The last way is using fb:app_id instead of fb:admin meta tag. If nothing works, you have cross checked, try it in a sub domain with same load balancer settings. If it works, you have nothing to do. It is definite problem of Facebook. The parsing is failing for their bug. If in your side both do not work, you need to change the set of your load balancers IP. I changed my another website’s, it oddly worked.

Hello, I enjoy reading all of your post. I wanted
to write a little comment to support you.