I am currently running several ads on facebook and I have just started using the facebook-click-id to replace facebook-pixels for the tracking. For some reason I have found that there are a lot of clicks coming in through the ads without the fbclid-parameter attached to the url as a get-parameter.
Through a google search I have found out that the only reasons the fbclid-parameter would not be attached to the url would be that the user clicking on the ad is not logged in to facebook or that the user is using his/her browser with the incognito-mode activated.
It seems odd to me that so many clicks could happen under those circumstances. Which is why I am wondering if there are other reasons why the facebook-click-id (fbclid-parameter) would not be attached to the url.
Are there any other reasons why the fbclid-parameter would not be attached to the outgoing url of a facebook ad? Thanks!
after doing some tests trying to solve the same problem, what I noticed is that fbclid parameter did not appear in outbound links when using the browser built into the mobile Facebook app.
So, I think that this is a Facebook limitation.
Hope it helps,
Related
I have written a PHP based blog for the company i work for. Not using any frameworks. I am having trouble tracking users who come from my facebook page's posts to my blog (not wordpress).
I have created a shortlink url. Let's say it is sample.co and it redirects traffic to sample.com. Everything seems fine until here. The problem starts here.
I am adding all user's ip's, user agents. But if even i get 500 visits, my code adds somethig like 3.000 visits. Facebook stats and Analytics shows similar stats (~500 visits). I see that ip's added to MySQL are all different. It usually happens with Android users. I have read somewhere that Facebook sometimes renders to their users the actual URL when FB shows the post. I mean instead of the widget, Facebook shows the whole page. I am not quite sure about that to be honest.
To solve this problem, I have created and added an jquery script to my page and listened users' scroll event. It worked great. Not seeing too much traffic. But this time the problem is i am counting less users. Even I get 500 users from facebook and Analytics shows similar results, my script adds only 200-300 to MySQL.
Does anyone know a better way to track real traffic? Or do you aware of such problem?
Thanks
It should be filtered on the basis of user agent.
https://developers.facebook.com/docs/sharing/webmasters/crawler
how to detect search engine bots with php?
Identifying users through IP is a good idea, but if your IP keeps changing, it's a good idea to use cookies.
http://php.net/manual/en/function.uniqid.php
If the cookie does not exist, you should see it as a new user.
I have found the answer. The problem is called preview (prefetch). Here is the link:
https://www.facebook.com/business/help/1514372351922333
Simply, facebook preloads everything when FB shows the thumbnail to the visitor to speed up your page's load speed. They send X-Purpose: preview header. So you can simply check if HTTP_X_PURPOSE header's value is preview or not. If so, do not count it as a visitor.!
Here are more detailed descriptions:
http://inchoo.net/dev-talk/mitigating-facebook-x-fb-http-engine-liger/
http://inchoo.net/dev-talk/magento-website-hammering-facebook-liger/
I have searched the Internet and SO for over a week, but have not managed to find anything yet so allow me to ask a question which has already been asked loads of time on SO, but for which none of the answers seem to be working for me.
I have a website and a Facebook page. On my website I have the usual Facebook "Like me" box. As I want to show some extra content to my fans when they visit the website - and encourage non-fans to become a fan - I would like to know if it is possible, via PHP, to:
1. Understand if the user is a fan
2. Understand if the user is logged into Facebook
What I would like to be able to do is send a PHP request to Facebook and receive one of the following three answers: "is a fan", "not a fan", "not logged-in/not a Facebook user".
In the first case I would show the fan-only content, in the secon case I would try to encourage the user to become a fan, while in the third case I would not do anything as I'm not sure the user is a Facebook user.
Please note:
1. I do not need any further identifying information
2. There is no app involved here, as users are fans of my page, although I could build one if necessary
Some answers on SO seem to point to this tutorial, but as my page is not an app, I cannot really use this solution:
http://www.masteringapi.com/tutorials/facebook-api-check-if-a-user-is-fan-of-a-facebook-page/20/
Unfortunately Facebook's APIs won't tell you if the user's logged in or if is a fan of your page until you make the user install your Facebook app (and for the likes you will need user_likes permission too).
The only kind of exception is that when you are running a page tab. At the time facebook embeds your content via an <iframe>, the signed_request POST parameter that comes with it will tell you if the user is a fan or not. You can read about the signed request's here..
I wanted to know how does FB sharer work. I wanted to share different things with FB when the user is logged into my website and not into my website. So i had 2 description tags i.e different for logged and not logged in users. But FB sharer is not recognizing it. It just displays only 1 description tag while sharing. I have used the FB lint also. Same problem i have there.
Does the user criteria does not work while sharing to FB?
The content that is displayed when a user shares / likes from your site is based on a scrape that is pulled every ~24hrs. If you're displaying a different page for logged in / logged out, then the Facebook servers can only see the logged out content and hence that's what's getting displayed from a share / in the linter.
If you check your server logs, you'll see a user-agent of facebookexternalhit/1.1. That's the Facebook Spider. Off the top of my head and without knowing your site's architecture, I can't really offer a good solution of how you'd provide FB with both versions, but at least you know what's causing the issue.
Well i think you should try facebook fb.ui method:
Example: http://fbrell.com/fb.ui/feed
Docs: https://developers.facebook.com/docs/reference/javascript/FB.ui/
With this method, you can easily customize your messages and also you can set different for logged in users and for guest visitors.
BTW to get that working, you should first add facebook js sdk
I'm currently working my way through the facebook-iphone-sdk and the MGTwitterEngine and I'm wondering why this all has to be so hard.
I'm not planning to access any data from the two social networks, just allow the users of my app to post a message as their status/update.
Now after I installed the facebook-iphone-sdk I realized they just send you to safari to authenticate at facebook and then back into your app.
Now this seems overly complicated for the users of my app, if they just want to post they don't have to go back.
Isn't there a way, I could just call something like
http://api.twitter.com/version/statuses/update?text="this is the new status text"
?
EDIT:
The first answer
http://twitter.com/home?status=[URL ENCODED TWEET].
is exactly what I need.
Unfortunately this works perfectly on the Laptop, though if you are not already logged in on the iPhone, you will be presented with a a screen where one has to press "login" once. (at the url "mobile.twitter.com/home?status=[]").
Pressing login there links you to "mobile.twitter.com/session/new" without the status argument and so once you are authenticated the status message is lost.
The URL you're looking for is:
http://twitter.com/home?status=[URL ENCODED TWEET].
This will open up a window of twitter and, if logged in, populate that tweet into the Tweet box.
For Facebook Share, the URL is
http://www.facebook.com/share.php?u=http://SHAREURLGOESHERE
There is lots of sample code that comes with the facebook-iphone-SDK. If you were to allow the user to pubish without authorizing it chances are apple would deny it.
I'm developing this Facebook Application and I was wondering if it's possible (and how) to programmatically, through the Facebook PHP Graph API, press some 'Like' button on some page?
Of course, this is optional on my application... I'm still not ready to really explain what application I'm doing, but it would be interesting to code such a feature.
Is it possible somehow?
By your description it sounds like you're trying to get a user to like something without the users knowingly clicking a like-button. This sort of interaction is not condoned by Facebook, I think. There are various black-hatty ways to accomplish this though, one fairly elaborate one is descriped here: http://www.liquidrhymes.com/2010/08/25/smoking-hot-bartender-is-some-smoking-hot-facebook-spam/
UPDATE Sorry, I might be wrong. If you get stream_publish extended permissions from the user, you might be able to like posts on their behalf by doing a POST to /POST_ID/likes. See Publishing to Facebook in http://developers.facebook.com/docs/api
You cannot do this. Facebok wont let you do a POST to /POST_ID/likes, you can only do a get request to retrieve their likes. What you are trying to do is a violation of facebook's TOS. I would suggest just adding a like button and "forcing" them to like before they continue with your application. However, in my opinion even that is kind of silly because they can instantly go unlike it after they have used your application.
i was looking for the same thing, but not to force a user into liking something, but actually for their own protection.
here is where i come from: on a web site (maybe on multiple pages) there is an "I Like" button, implemented as described by facebook.
each time a user goes to that page, the browser will make a request to facebook, throught the iframe that contains the button, providing all the info that we are used to from a web server log file.
if the user has in the past logged in facebook and not cleared the cache. the request will also contain the cookie indentifying the facebook user.
so even more then analytics, facebook know all about the user activity on those pages.
so i wanted the user to only give this info when they decide to.
my solution was to have a button (as graphic only) on the page. when the user clicks it a new frame should open and only there the facebook code should be executed.
obviously on the new frame i could not put the normal "i like" code, since that would require a 2nd click for the user. at this point i would need the "programmatically clicking of the i like button".
it is not an opengraph solution, but it works: the frame just does a redirect to
http://www.facebook.com/share.php?u=URL