Should I remove facebook pixel TAG after having facebook conversion api TAG?(both on GTM) - facebook

I created a web container and sever container,
and I had created the facebook CAPI tag for tracking on the server container,
I can see in the progress, it does not need to create a facebook Pixel.
but my current setup was retaining the facebook pixel tag on client side.
I know facebook pixel is required for the facebook CAPI tag,
but what about the facebook pixel tag on web container?
Because I can see the client side tracking may be affected by the anti-tracking feature,
and server side works well.
Should I remove the client side tracking, only do the tracking from server side?

Facebook itself recommends to not deploy a server-only implementation because you can lose many events that are "browser native", like PageView or ViewContent. The official recommendation is to adopt a redundant setup, sending events via both Pixel and Conversions API. Facebook has the ability to deduplicate events and you get more precise and optimized conversions.

Related

Does Facebook Pixel provide an alternative to image-based tracking?

I have been asked to add Facebook Pixel tracking on to a site.
I would ideally like to maintaining a strict CSP policy – I have some misgivings about including third-party sites given our lack of control over their content.
Ideally, I would like to avoid letting Facebook load an image on our site via our img-src. I can't seem to find an alternative in Facebook's Documentation. Where as, Google Analytics and some other analytical services provide alternative transport mechanisms – namely XHR – to image-based tracking systems.
Does anyone know if there is an alternative, non-image-based, transport mechanism when using Facebook Pixel?

How can I create two different isntance of connection to Facebook?

I need to have two different Facebook connection on the same website! So, they points to two different Application Keys.
How can I manage this?
This isn't something Facebook JavaScript SDK supports and this can't be simply achieved by storing FB object in other variable before adding another instance of SDK.
In the code of SDK FB is used directly pretty everywhere, and the response from API will use it too.
BTW, Even if it was possible your users would be needed to Authorize two applications if you want to access their data (transfer of data from one application to another violate platform policies).
As #JuicyScripter wrote, the js sdk itself can not be shared among different apps in the same document, and that's exactly what you can try to play with.
How about adding an iframe per fb app?
You have the main page (the +1) which acts as usual, then you load an iframe inside of it and in it you can load another fb sdk for a different application.
Depending on what exactly you plan on doing, you might need to communicate between iframes, which will only work if they share the same domain.
Another approach is to make all api requests from the server side, but you'll have to have an access token for the user per app.

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.

Facebook Open Graph without a browser

For a middleware system with internet (which works inside a set-top box) I want to develop a primitive Facebook interface where users can type their user-names and password, showing their latest notification, messages and other casual stuff on the TV screen by using the recent Facebook Graph API.
This middleware program uses Java ME to run programs (such as this simple facebook app) and it can connect to internet however it doesn't have a real web browser. Without browser it can connect to any url to retrieve the JSON response however I am not sure how to achieve authentication without a real browser.
Under this circumstances, is it possible Facebook authentication? If you think so, what approach would you suggest ?
Thanks
Facebook provides trusted partners with a private Authorization API to get an OAuth 2 token from a username / password.
A more complicated approach would be doing something similar to how Netflix enrolls a device:
device calls server to obtain a Code
device shows code on screen and directs user to go to URL on server and enter Code
server redirects user to Facebook and obtains OAuth token, user told to go back to device
device calls server with Code and obtains OAuth token
device can now make calls directly on behalf of user
According to this documentation on "Desktop Application Authentication" I don't believe your desired result is possible:
Facebook's OAuth implementation does not include explicit desktop application support. However, if your desktop application can embed a Web browser, you can add Facebook support to your application easily using the same OAuth User-Agent Flow used by JavaScript clients.
However, it is clearly possible for certain vendors to do this, since Microsoft's Xbox 360 Facebook application does exactly what you are proposing. I'd be interested to see if anyone has dug up any API for doing this that Facebook doesn't want in their most obvious documentation.
This isn't an answer but I'm trying to do the same thing. Check out this guy's blog which uses another server to proxy the requests:
cory wiles blog
If you figure it out please post a detailed answer here so I can do it to.. :)
I think it is possible though it is pretty complicated and subject to sudden changes of Facebook interface. It might break the agreement between you and Facebook.
What you do is to emulate the Facebook.
One path you have to set up a Facebook application. Once you got the authorisation from user, you can to something with Graph API.
You need to the Facebook log-in process and authorisation process. There are some capturing tools on http/https request and response. Analyse them, both header and body.
Once you know the authorisation mechanism, you can replace it with you own. Everything afterward is on Graph API.
Another path is to emulate Facebook login and message and notification process. Capturing and analysis is needed.
In the past I have used a tool called screen-scraper (full disclosure: I used to work there) to automate logging in to facebook. Basically, it imitates a browser session; it allows you to set session variables (i.e. username, password) which would then be submitted to facebook, just as if the user had submitted them in a browser.
You may not be able to use screen-scraper in your set-top box environment (although it is java-based, so it's possible it would work). Even if it doesn't, you could implement a similar strategy in java, making the HTTP calls a browser would make to load the login page and submit the user's credentials. To keep the user's info safe make sure whatever HTTP client library you use supports HTTPS.
Proxy tools and extensions like Charles, Fiddler2, Firebug, Chrome's dev tools, etc. are helpful in seeing exactly what the browser is sending to the server in requests.

How can I implement Facebook Chat on my site?

I'm developing a site with something similar to the Digg bar at the top. One of the features requested is a live chat using Facebook. Is it even possible to implement Facebook Chat on my site by using Facebook Connect or other methods? And if so, how?
[update] I've seen that it works with Pidgin and Adium, but what I'm looking for is a site based implementation (think AJAX & HTML living at the top of the page).
It appears that the Facebook team has at least begun, if not finished, implementing an xmpp/jabber interface for Facebook Chat. This would allow you to use any XMPP enabled client to connect to Facebook. That said, there's at least one javascript jabber client library available that I can find. Although, you may have to implement a proxy on your web server to allow the JS client to talk to the Facebook server.
Also, I'm not sure how they're doing it, but Meebo has managed to enable Facebook chat integration on their site with Facebook Connect. I haven't found anything mentioning it, but this functionality may be easily available through the Facebook Connect API (documentation).
To answer your question: Yes, it's possible.