How to Integrate Facebook Insights into Your Social Plug-Ins
Facebook allows you to use Facebook Insights to see how visitors to your website interact with the Facebook Social Plugins you’ve installed on your website. For example, when a user shares a link to your site on Facebook using the Recommendations plug-in, that action can be tracked in a Facebook Insights report about your website.
How to set up your website as a Facebook application
In order to access Insights data for your website, you must first create a Facebook application. Creating a Facebook application allows you to associate an application ID for each social plug-in on your site, which enables Facebook to track the ways Facebook users interact with the plug-in. Creating an app gives you the capability to access Insights for each of your plug-ins.
To create an application, follow these steps:
Visit https://developers.facebook.com/apps and click the Create a New App button on the right side of the page.
If this is your first time creating an application, you must first grant Facebook permission to access your basic information.
Enter the requested information:
App Name: This is a unique name for the application you are creating. Because only you will see this info, you can simply use the name of your website or the social plug-in you are creating the app for.
App Namespace: This field doesn’t apply for your purposes, and for now you can leave it blank.
web Hosting (optional): Select this check box if you’d like web hosting services.
Note that by creating an app, you are agreeing to the Facebook Platform Policies.
On the next screen, enter the captcha as you see it and then click Continue.
The Basic Info screen appears. In this screen are many fields, some of which are already filled in. The following fields are necessary to obtain a Facebook App ID for your website:
Display Name: This is the application name you created in Step 2.
App Namespace: This is the name you created, if any, in Step 2.
Contact Email: This is your default e-mail address, but you can change it to any e-mail address you prefer Facebook to use.
App Domains: Enter your website’s domain URL. Subdomains will be enabled as well.
Hosting URL: Not applicable.
Sandbox Mode: Not applicable (leave disabled).
In the Select How Your App Integrates with Facebook section, enter your website’s URL in the Site URL field.
Click Save Changes.
You are finished creating your Facebook app! Now you must edit the HTML in your website to integrate with your application — and particularly your app ID.
The goal here is to allow Facebook’s platform to collect information about the way people interact with the social plug-ins on your website. Your application ID, then, allows Facebook and your website to talk to each other.
How to integrate Facebook’s software into your website
The last step requires you to have access to your website’s HTML. If you don’t know how to do that, consult a professional to help you.