Google Analytics incised of Facebook - facebook

i wanna put the google analytics inside of Facebook.
I use the static HTML and the FBML , and i put the code of Google Analytics in the page (the javascript). However i can't get any results in google analytics.
Can someone tell how can i resolve that issue ?

That is probably impossible. Facebook should provide their own analytics.
Reason, you can't have it is because facebook probably eliminates Javascript form the content you post for security reasons.
Start here:
https://www.facebook.com/help/336893449723054/

Related

How do facebook ads spy tools scrape the data?

How do these websites like BigSpy get the latest ads from Facebook?
Do you need to scrape all the pages on FB to a database and then use Puppeteer or Selenium to click through the Facebook page UI and look at the ads?
Or is it somehow done through Facebook Ad library?
Could someone share the process by which one could code it up themselves?
Thanks.
Example website:
https://bigspy.com/adspy/facebook/
You can do with scraping tools puppeteer with searching special items on facebook or instagram.
Adspy tools collect ads from Facebook in two different ways:
They get their data from Facebook’s “Ad Library” archive, which does not give detailed information and is outdated. Some adspy tools use this feature to collect ads like Spytex. They do this by utilizing add-ons and similar techniques.
Another method is a bit advanced: Getting data directly from Facebook Graph API itself. There are some adspy tools, like AdFlex, that collect ads in a direct matter, without any intermediary. AdFlex uses its own developed crawlers to scrape ads from FB.

Differentiating between Google Analytics Tracking of Facebook App and Web App

I have a web app at www.mydomain.com/webapp and its set up with Google Analytics. I create a facebook app at apps.facebook.com/webapp and iframe in the above url.
Is there a way to distinguish activity of users on facebook from users on mydomain?
Thanks for any help and direction you can give me.
You could use JavaScript to determine that your page is displayed in an iframe – but that would also be true if maybe other sites embedded your page.
A better way would be to check for the [signed_request][1] parameter that gets POSTed to your app on initial load into the iframe. (If you were paranoid about someone “faking” that, you could also verify the signed_request.)
Once you figured out that your page was actually loaded inside Facebook, it should be easy to execute the appropriate JS code to send that info to Analytics.

How to create an interactive Facebook page?

I've been asked to code a Facebook page, and I have no idea where to start. A bit of googling around has lead me FBML (Facebook markup language) but I can't find anything definitive in the help or any good tutorials on how to code a custom facebook page.
Anyone have any great links on how to create a Facebook page? Beyond actually just making the page on Facebook. Things such as embedding video, adding backgrounds, forms, animation and fully featured web page type functionality.
The design we have has all these elements, along with pulling RSS feeds and such.
Any help, or direction would be great!
Thanks,
You should not use FBML anymore!
We are in the process of deprecating FBML. If you are building a new
application on Facebook.com, please implement your application using
HTML, JavaScript and CSS.
A facebook app/page is a simple html site where you connect to facebook via the Facebook API. In the meantime the facebook documentation has become quite readable. Have a look at:
SDK tools (JS and PHP)
Authentication (how to know who the user is)
Permissions (the user has to approve that you may gather information)
The Graph API (how to get informations)
Dialogs (how to interact on the clientside)

Is the Like Button the only currently supported method for posting a webpage to Facebook?

The Like Button seems like a very specific, and not very elegant in my opinion, solution to allowing users to post a web page to their Facebook profile. You have two options: 1) Use the iFrame solution, which allows very little flexibility in functionality, integration or appearance or 2) the XFBML solution which requires loading the entire Facebook javascript SDK just for one little "share this" button.
Is the Like Button the only way that is currently supported by Facebook to allow sharing of content to a user's Facebook profile? It seems to be the only method mentioned anywhere in the Facebook developer documentation, and I've had trouble finding any alternatives elsewhere on the internet.
There was a service called Facebook Share:
http://www.facebook.com/sharer.php?u=<your url>&t=<your title>
I guess it's still working but I'm seeing people having troubles using it and Facebook is forcing developers to use the Like Plugin.
Now:
Most likely your visitors will have the Facebook JS Library cached on their browsers
Facebook uses CDNs and their servers are super fast
Even if it doesn't fit in your design, don't forget that users are used to it
You can create a Facebook Application and use the Graph API but it's way more complicated
Don't use their services!
Actually, Facebook share is the simplest and most natural solution to share content on your FB profile.
You may want to read this article.

how to track traffic source for a Facebook iframe application

I have a facebook iframe application - let's call it apps.facebook.com/my-app.
We currently use Google Analytics for our tracking, and I correctly have Google Analytics installed on my application (that is included via iframe to the FB app) & it is tracking any use of the application mentioned above.
However, I would like to find out what the traffic source is to my-app PRIOR to facebook; ie, if a user goes to domain1.com, and follows a link from there to apps.facebook.com/my-app, it appears that the "traffic source" gets tracked as "apps.facebook.com" rather than "domain1.com", b/c the GA is installed within my code of the page included via the iframe, so its http referer is apps.facebook.com
Is there any way to retrieve "domain1.com" as my traffic source, in this case? Or any suggestions to try? (whether using Google Analytics, or another source? I see that the facebook insights does give some information on referrers, but it's not very extensive at all; no date ranges, etc)
Thanks so much!
- ali
Just using Google Analytics in Facebook, there isn't much you can do here. However, what we've done in the past (to general success) is to create a redirect link outside of Facebook with the analytics on it, and push all traffic there first.
In other words, create a page at www.myapp.com/redirect, and put the google tracker there (or, alternately, just append the referrer url to the query string manually). Then, redirect with javascript out to the Facebook canvas app URL. That way, the user ends up in the right place, and you get your referrer info as well.