Differentiating between Google Analytics Tracking of Facebook App and Web App - facebook

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.

Related

IFrame application to buy tickets

So I am planning to develop an IFRAME facebook app which lets users buy tickets from Facebook using our website.
Basically I would like to know whether its possible to do what I have in mind.
Each event posted in our website has a specific link associated with it and we already provide a facility whereby event organizers can integrate our app into their website using an IFRAME.
Now I would like to know whether it is possible to have the same concept applied on a Facebook App. Each event will have its own EventId and I do not wish to have all events listed on our App. Each promoter that has his own Facebook page will be able to integrated the APP and will only see his events. Is this possible since you need to bind your Facebook to a specific URL?
Thanks
Yes! This is possible. What you'll need to do is have a tab application that the promoter installs on their page. Each promoter installs the exact same application so you only need to have one.
When the app is loaded within the page, it will receive a signed_request parameter. You'll need to decode it first, but once you do, you'll be able to see where the app is running because the signed_request will contain the page_id. Once you know what page is displaying your application, you'll be able to display appropriate content.

On Facebook is it possible to force an app to display as a page tab?

I have a Facebook app the currently consists of 3 elements - an App on Facebook, Mobile Web, and a Page Tab.
Currently if I use the app URL it detects whether I am on a mobile or not and directs me to either the app on Facebook or the mobile web site.
What I'd like it to do is always show the app in the context of the page tab. Is there anyway to force this?
I tried looking at whether I could use the page tab URL directly and have that redirect to the mobile but depending on how I've linked it either returns a 404 or just takes you to the Facebook page. I appreciate I could do my own mobile detection but I thought I'd check if I'm missing something in Facebook first.
I wrote an explanation of how to do this here: https://stackoverflow.com/questions/14434072/create-facebook-page-tab-and-publish-template-on-it/14455665#14455665
Hope this is what you are after!

twitter and facebook app in a modal div inside an iframe

I need to link the user's twitter and facebook profiles in a website profile while the website is loaded inside other websites' through iframe.
Is it possible to do that using a modal div inside that iframe? I'm quite in trouble thinking about the return url and page reload.
Have some example?
btw i'm using php but think it's not important now
Thanks,
A.
You can do what ever you want in your page even when it resides in an iframe. What you can do in it (visually) is only limited by the dimensions of the iframe (unless the hosting page has some kind of layer on top of your iframe).
I can't speak of the twitter way of doing things (you can always check their documentation) but with facebook it's pretty easy to integrate into the graph using the api.
You need to have a facebook app, and then in your page (even if it's in an iframe) you can use the javascript sdk to authenticate the user and then use the graph as you need (and have permissions to).

Facebook Application - Like Button

I'd like to develop a Flash/Flex based application that I'll integrate withing my Page on Facebook.
I've seen on many applications that in order for a user too see more stuff on the application, user first of all has to click LIKE button on my page.
I've searched but couldn't find right thing I've been looking for, probably I don't know how to search for it correctly.
Maybe you could help me out to find right source for that.
I don't think Liking the app really matter.
What you might be looking for is authorization from the facebook users. For instance if your app need to post status update on the user's wall, you'll need to get authorisation from him/her first.
You should probably read this (rather generic) intro on facebook's developer website:
http://developers.facebook.com/docs/guides/canvas/
This might be a helpful read too:
http://developers.facebook.com/blog/post/116/
Finally, haven't done it in AS3 but apparently Adobe has an as3 version of the facebook sdk available:
http://www.adobe.com/newsletters/inspire/november2010/articles/article6/index.html
http://code.google.com/p/facebook-actionscript-api/
what you are reffering to is liking a page beofore being able to interact with an application that has been embedded into a page. A page tab app.
You need to parse the signed_request that facebook passes to your application and once you have parsed it you will be able to see if the user has liked your page or not.
Here is a link to some more information about singed_requests

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.