m.facebook.com / referrals for Safari in Google Analytics Improperly Tracked - facebook

My google analytics tracking code works well for all traffic streams except for m.facebook.com referrals on the Safari browser. For these users, GA only records 1 pageview, avg session duration of 0, and bounce rate of 100% - this of course can't be correct. Here's a screenshot of GA separated by browser:
I assume there is a technical issue going on here, since a 100% bounce rate is impossible when compared to the other browsers which are working. I've QAed extensively and it seems that these people still access the site well, but tracking is not working for everyone.
Any ideas on what's going on here? Ways to debug it further? Has anyone had this problem before? Does it happen on your sites too--is it a global problem?
A few thoughts:
It is probable that these people are using the native Facebook browser in the FB app which then loads a replica of their default browser. Maybe this double layer is preventing tracking? If true, then why does Safari (in-app) seem to be working which is where the Facebook browser using Safari should show? If embedded Safari works, then why not regular Safari? Embedded works, but non-embedded does not.
Maybe there is an http / https issue going on here.
Maybe there is an ad-tracking, cookie, domain blocking policy preventing this, but again why not for both Safaris?
The bounce rate on Chrome seems elevated too.
Maybe a javascript error happens after loading GA on this particular browser / environment. But then why does it report the first page, but not others? Users seem to not be affected by this error; just tracking is. The Facebook JS API and adsense ads are loaded afterwards. Adsense ads on safari get a lot of errors and cross-domain preventions. - this happens on another site without the FB api.
Normal mobile safari not referred by m.facebook.com acts entirely normally.
Any help / thoughts / insight would be much appreciated! Does this happen on your social traffic too?

Facebook is not reporting certain automated accesses as bots. Their listed protocol is here: https://developers.facebook.com/docs/sharing/webmasters/crawler
But they also frequently come with:
referrer: http://m.facebook.com
browser: Safari
platform: iOS
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1
There is no real way to check that they are bots except to do a reverse IP lookup and see that their ISP is Facebook Inc like where the listed bots originate: facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php), facebookexternalhit/1.1, and Facebot.
Google analytics does not recognize that this traffic is bot traffic and so it is reported in stats.

Related

users cannot be redirected to website from facebook advertisement

We publish advertisement on facebook and we have a new domain. The problem is that advertisement click rate on facebook panel is 6193 but only 1682 person enter website accordşng to google analytic.
There are about 4500 hit which is lost. AS you know, users are redirected to our website after click on facebook advertisement but they cannot access to our website. we are waiting your kindly response.
our website: testmastersatinal.com
Try using Google's URL builder to properly code the landing page URL in such a way that GA will recognize the traffic as having come from your FB advertising campaign. Here's a blog describing how it is done.
For reasons that I do not yet completely understand - but apparently have to do with the internal FB redirect process for ads, much of my traffic from Facebook shows up in Google Analytics as (direct)/(none). I've found that setting the GA UTM codes on the landing page URL will help by using Google's URL builder helps with this issue.
More generally, in my experience, advertiser reported clicks are often different from what you see in GA. In fact, I'm working on trying to resolve this issue now with another advertising platform (not FB) who is billing us for 2.5x the number of clicks we are seeing in Google Analytics.
There are many possible causes for this, and you can find relevant discussions on
webmasters, moz.
One thing you should try is segmenting the referrals by device (mobile, tablet, desktop) or operating system, etc. See if the percentage of traffic is much lower from your ad on one particular device or operating system. This may indicate that the GA tracking is not working correctly on that device or OS.

Cannot set a cookie before redirection

We have a weird problem in that I have developed a mobile version of our website that just sits in a sub folder of the site e.g /mobile/page.asp (I know .asp classic don't blame me!)
I did want to create two domains one for the mobile site one for the normal site but I was told by our CTO to just do a sub folder.
However the problem is we want to be able to set a cookie that lets us know whether the user WANTS to be on the main site OR mobile site. They could in theory be on a desktop and still choose to go the mobile version (as we have links in the footer to switch views, e.g from the main site to the mobile site and vice versa).
However if someone comes to the site without a cookie set we do some user-agent sniffing do determine their device and then set a cookie before redirecting them to the right part of the site.
All our logic seemed correct however when we started testing it we started getting weird results.
On my iPhone 3gs it was working perfectly (most up to date OS) however on other peoples iPhones or Android phones people would
-clear cookies (at the beginning of the test)
-visit the site
-the agent sniff would redirect them to the mobile site
-but when they clicked on a further link on the mobile site the code took them back to the full site.
This didn't happen for me - also on our demo site it worked for some people and not for others - and also for someone on an Android device who downloaded FireFox it worked fine.
I and another developer who had the problem sat together and went through the steps one by one, doing the exact same thing, with debug on showing us what was going on.
However whilst I was getting a cookie set to "mobile" when I went to the mobile site he for some reason wasn't. It was like the cookie couldn't be set before a redirect even though the redirect was to the same domain.
I read some articles which said there was some issue in webkit with cookies and redirects which made me think this could be the issue on the iPhone Safari browser but that wouldn't explain why my 3Gs phone worked.
We have tried re-working the code but we need to be able to set cookies and do redirects in all cases. We even tried just changing the code that was setting a cookie to a session variable but even that didn't work.
I am really stuck and so is everyone else. We have spend days trying to debug it but cannot find a common denominator which would explain why it works on some devices but not others.
Can anyone help!!! Any advice would be much appreciated.
Thanks!

FB.login callback not working on Opera Mobile browser

I am testing our web application on OPera Mobile. We have a signIn through facebook link. It takes me to the login page, but after I enter my ID and password nothing happens. If I click on the login button mutliple times, it gives me too many failed attempts error. But after this my facebook account seems to be logged in.
If I login to facebook and come back to our application and click on login, nothing happens, I see a blank page. After I did Javascript debug, I could see that the FB.login() callback is not running at all.
Can any of you tell me what could be the reason?
Thanks,
Yamini
Facebook Connect contains some browser sniffing (or "pseudo-browser-sniffing", detecting some features and making assumptions about what browser is used and what other features are available). They have functionality that uses HTML5's window.postMessage() which ought to work just fine in latest Opera on both desktop and mobile, but due to the unfortunate sniffing approach they send Opera down another branch in their script. To be fair, this is for historical reasons, the postMessage() support was in flux for a while while HTML5 was shaping up and getting agreement on all details, so there are probably still some implementations (earlier Opera and IE versions?) that are still in use and would not work with Facebook Connect's JS.
Ideally, Facebook would fix this. I will follow up with Opera (to double-check that what I recommend Facebook should do will work on Opera Mobile) and Facebook (to try to get their browser detection adjusted).

Disable Facebook mobile browser detection?

Does anyone know of a way to disable the mobile browser detection and redirect feature of Facebook via querystring parameters?
For example, if I go to www.facebook.com/CraigslistGenie in a mobile browser, I get redirected to http://m.facebook.com/CraigslistGenie. I would like the user to stay on the www version of the page.
you either change the user-agent to achieve that or you add ?m2w to the link i.e. http://www.facebook.com/CraigslistGenie/?m2w does NOT redirect (tested on Android) while http://www.facebook.com/CraigslistGenie does redirect to http://m.facebook.com/CraigslistGenie
For reference see here and here.
The first answer is correct, however if you want it to work on an Android phone (and keep working when you click on links within the site) you need to go into the browser settings (after you've gone to the http://facebook.com?m2w) and check the "Desktop version" setting.
This will prevent the browser from constantly trying to send you to either the mobile version of the site or the FB app.
Method given by Yahia is good. Adding ?m2w to link means converting mobile to web view.
Or,
Change settings of mobile browser i.e. User Agent. Both Steel and Dolphin browsers allow you to change that setting however. Both are free in the market. (I am not doing any marketing of browsers.)
Some of you may have noticed that, despite changing the User-Agent in the browser, you are still sent to a mobile website anyway. Check this patches given.
Check this huge discussion about tricks used for hiding mobile browser.

How do android or iphone clients work?

I'm trying to understand this concept but I don't get it yet. I'm new to mobile connections.
How do mobile apps and/or clients connect to the internet, if they do? if not, then, how do they serve real time data from remote servers (like twitter, fb) etc..?
I've heard that mobile apps don't require internet connection but I'm confused because I don't know how they get the data from the servers of twitter or fb or any application.
For example m.facebook.com is a site so it'll only work with some type of connection on a mobile, but with the app.. what happends (how do all of a sudden you don't need internet connection to serve the data from their servers)????
Think of a Web browser. It's an app that issues HTTP requests over the 'Net and interprets the response by rendering HTML and images, running scripts, etc. Now, there's nothing magical about the browser; it's just a program with HTTP capability.
Any other app can do the same. Except it does not have to interpret the response like the browser does. An app can just as easily issue HTTP requests and do stuff to responses. That's how Facebook, Twitter etc. client work. They normally work, however, not with user-facing parts of the target site, but with software-facing bits (called "The API").
Not all mobile apps require or use the Internet. Most games, for example, don't. But the apps that interact with websites, like Facebook, do.