My GCLID code gets stripped when user is redirected to my Mobile Site - redirect

I have a tracking issue due to GCLID gets stripped when users get redirected from our desktop site to our mobile site. Let me know how we can get this fixed.
Here's a sample:
When a user is detected as using a mobile device, they are redirected automatically. For example, if they were going to sitename.com/, they would instead end up on sitename.com/?___store=mobile2
The problem we are encountering is that we need certain query parameters from the original URL to be preserved when the redirect happens in order for tracking to work correctly.
If someone clicks a Google ad, they'll be taken to a URL with a gclid parameter appended by Google, for example: sitename.com/?gclid=ABC_123-abc
However, if the user is on a mobile device, they'll be redirected to sitename.com/?___store=mobile2. As you can see, the gclid parameter is no longer present.
Let me know if you guys have any solution to this. Thanks a lot.

The code that performs the redirection needs to preserve query parameters on the original request. In your case, it should also append an "&" and the ___store=mobile2 parameter.

Related

Using m.me links with ref param

I'm trying to deeplink users into my facebook messenger bot, and I need to pass some data in at the same time. Supposedly this can be done by using m.me links, along with a query param.
My bot's page is https://www.facebook.com/Willy-1610141399078870/
The m.me url would be something like this. https://m.me/Willy-1610141399078870?ref=somedatagoeshere
The m.me link works to a degree on desktop, but the data isn't passed to the bot. I don't particularly need it to work on desktop.
However, when I try to open that link on ios or android, I get an error message.
Android
This user name doesn't exist. Try another code or link
iOS
Username was not found
The bot hasn't been published yet, so it won't be visible to anyone else. I need to be able to test this functionality before I publish, so I hope that's not what is causing the failure.
Has anyone else been able to use this feature?
It seems that the facebook-generated username can't be used for m.me links. It requires you to register an explicit username.
My page's generated name was Willy-1610141399078870, so https://m.me/Willy-1610141399078870 wasn't a valid url.
To register a username for your page, go to your page > About > Create Page #username.
Then, you can attempt to pick a username that isn't already taken. Somehow, #willy-the-test-page is already taken (?), so I got this incredibly confusing error message:
Taking the error message at face value, I decided to create another page and try again. This time, realizing that the message didn't mean what it said. Picking an available username clears the error message, and allows registration.
Just kidding! It will tell you again that the page isn't eligible.
The solution was to create a totally new page, and go through the #username creation flow again. It worked for me on the second attempt.
It's rumored that a page needs at least 25 likes to become eligible for an #username, but this isn't true in all cases.

Facebook Invite Friend Dialog app_non_users filter seems to have no effect

I am building a Facebook Application that sits in a facebook page tab (and has a Canvas URL hook.) I am trying to implement the app_non_users filter.
When I introduce the filter, here is what I see:
In both ['all'] and ['app_non_users'] everyone is shown (including those who have authorized the app)
In ['app_users'] setting, no one is shown.
I am not running this on mobile, and I am passing the parameter in expected JSON form (proved by the fact that Facebook is doing different things for different values.)
I am also not using any other conflicting filters or even the "to" parameter. When I inspect the network tab, I see the following params being passed to FB:
message:Invite Message
title:Select from list of your friends
filters:['app_non_users']
api_key:xxxxxxx
app_id:xxxxxxxx
locale:en_US
sdk:joey
display:async
frictionless:false
redirect_uri:https://xyz.com
__d:1
__user:xxxxxxxx
__a:1
__dyn:798aD5z5CCU-wEbw
__req:9
Based on the above results, it seems to me that Facebook doesn't consider just app authorization to mean that a user is a app_user. So, exactly what makes a user app_user and how do I, as a app dev, make that change?
From the question I think you are using the filter alone without any other filter for the Request dialog box. If that is correct then follow the bug here as it points to the same issue as you are having.
As an alternate, until the bug is fixed, I might suggest you to use more than one filter so that both of them work correctly. I tried the same with RELL here.
I made workaround using 'exclude_ids' parameter and server side PHP.
Usng PHP I have populated exclude_ids with ids of current user's friends which already entered my app (I have those fb ids in my database), so Request dialog doesn't display those friends to user.

Crazy Facebook UI Dialog Error

So I cannot find any reason I am seeing the below behavior and if anybody has some insight it will be greatly appreciated.
Basically I am using the FB.UI from the JavaScript SDK to send a message to a user with a link. The link ends with a Guid, like http://www.domainname.com/register/33a1a0ae-e0fe-4eb6-9bf9-146d5492e3d6. This works sometimes, but occasionally fails with a generic 500 error from FB.
I have pulled out the HTTP POST request and have found a solution that I can recreate, unfortunately I cannot share the access code to allow SO users to actually run it (I replaced all sensitive parameters). Below are two identical requests that differ only in the Guid. The first succeeds every time and the second fails every time. I have numerous Guids that are doing this which makes if unreliable.
https://www.facebook.com/dialog/send?access_token=XXX&api_key=XXX&app_id=XXX&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df2cb8f5c1ca0402%26origin%3Dhttp%253A%252F%252Fwww.domainname.com%252Ff350c0fd55d5764%26domain%3Dwww.domainname.com%26relation%3Dparent.parent&channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df11a615f3b71192%26origin%3Dhttp%253A%252F%252Fwww.domainname.com%252Ff350c0fd55d5764%26domain%3Dwww.domainname.com%26relation%3Dparent.parent&description=test&display=iframe&link=http%3A%2F%2Fwww.domainname.com%2Fregister%2F**33a1a0ae-e0fe-4eb6-9bf9-146d5492e3d6**&locale=en_US&name=test&next=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df22e359d88321ce%26origin%3Dhttp%253A%252F%252Fwww.domainname.com%252Ff350c0fd55d5764%26domain%3Dwww.domainname.com%26relation%3Dparent%26frame%3Df33c13cd4ecc156%26result%3D%2522xxRESULTTOKENxx%2522&picture=http%3A%2F%2Fwww.domainname.com%2Fimg.gif&sdk=joey&to=XXX
https://www.facebook.com/dialog/send?access_token=XXX&api_key=XXX&app_id=XXX&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df2cb8f5c1ca0402%26origin%3Dhttp%253A%252F%252Fwww.domainname.com%252Ff350c0fd55d5764%26domain%3Dwww.domainname.com%26relation%3Dparent.parent&channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df11a615f3b71192%26origin%3Dhttp%253A%252F%252Fwww.domainname.com%252Ff350c0fd55d5764%26domain%3Dwww.domainname.com%26relation%3Dparent.parent&description=test&display=iframe&link=http%3A%2F%2Fwww.domainname.com%2FFregister%2F**dd171262-dbcc-43c3-b9d1-e37dc53e3520**&locale=en_US&name=test&next=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df22e359d88321ce%26origin%3Dhttp%253A%252F%252Fwww.domainname.com%252Ff350c0fd55d5764%26domain%3Dwww.domainname.com%26relation%3Dparent%26frame%3Df33c13cd4ecc156%26result%3D%2522xxRESULTTOKENxx%2522&picture=http%3A%2F%2Fwww.domainname.com%2Fimg.gif&sdk=joey&to=XXX
I tested both of these urls:
http://www.domainname.com/register/33a1a0ae-e0fe-4eb6-9bf9-146d5492e3d6
http://www.domainname.com/register/dd171262-dbcc-43c3-b9d1-e37dc53e3520
with the js sdk send method, and indeed the first url resulted in a 500 from facebook, while the first managed to send it.
I can't understand why the first UID triggers an error while the second does not.
The reason I kept asking for a working example of such urls is that when you share a url using facebook, they scrap that url (unless it's already in their cache) and extract meta data of that url so that a feed story can be composed.
Since the urls that I was trying are not accessible for facebook it might somehow trigger that error.
If I try this url:
http://laine.webhop.org/tresendas/register/33a1a0ae-e0fe-4eb6-9bf9-146d5492e3d6
then it works and I don't get the server error, even though it has the same UID as the first url I tried.
I suggest that you try to use urls accessible to facebook, if you still get errors for certain UIDs, then you should probably open a new bug report.

Facebook Send Dialog fails to send links to Facebook itself -- why?

I'm trying to use Facebook Send Dialog in a WinForms frame with a browser control and direct URI (you can repro just by clicking the links below). It works fine with link=http://www.foo.com, sending the message properly if you enter a message and click "Send":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.foo.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
However, this fails with link=http://www.facebook.com or any path under it. Clicking "Send" just gets you "Sorry, something went wrong. We're working on getting this fixed as soon as we can.":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
The aim is to write a script to make it easier to send messages asking all users in a particular group to a page (prepopulating the recipient list). Since Facebook has restricted groups larger than 500 members, our organization has to move to a Facebook Page, and I want the Send Dialog to link the new Facebook Page. Why won't this work? Is there a workaround? Are there other criteria for what links Send Dialog will and won't send?
Also, is there a way I can determine whether the send occurred or not, for example an event to catch? Whether you send or cancel, the Navigated event is still redirect_uri/#_=_.
Once I have Send Dialog working, I will add Show-FBSendDialog to Facebook PowerShell Module, which already has numerous capabilities to automate Facebook from PowerShell.
ran some tests and it seems it is blocking any fb domain http://on.fb.me/91S2P8, sometimes this is temporary otherwise need to rethink...
I see your second link isn't working... but if you add your company page id or name to link it should work. following link works for me:
https://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com/Intel&redirect_uri=http%3A%2F%2Fjonnewman.com%2F&display=popup&to=100002395463043
hope this helps
I got solution. I also had same problem. No post helped me. Solving error for 2 days.
There were posibility of two mistakes(that was done by me).
Link Parameter given in url should be working. I have linked to api namespace but not given SSL url. So it was giving problem. You can given your web site address.
And redirect_uri parameter should be working. Try to give redirect_uri to same page most probably.

Facebook Connect response ignoring 'next' parameter

I'm using the Facebook connect login API for desktop apps presented here:
http://wiki.developers.facebook.com/index.php/Authorization_and_Authentication_for_Desktop_Applications
I'm finding that the parameters I pass arent working correctly. Here's an example of the URL I use for the site:
http://www.facebook.com/login.php?api_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&connect_display=popup&v=1.0&next=http://www.facebook.com/connect/login_success.html&cancel_url=http://www.facebook.com&fbconnect=true&return_session=true&req_perms=publish_stream
If the user logs in correctly, they are redirected to
http://www.facebook.com/
instead of the value in the next parameter. This is particularly frustrating since the url of the site they were redirected to is supposed to contain login information.
Amazingly, the cancel_ url parameter works fine and sends the user to the correct target (I tried multiple cancel_url values inside of the facebook.com domain and they worked). Anybody dealt with this?
Is the API Key valid? Is your callback url set correctly in the application ? the next parameter is seeming to be ignored on non Internet Explorer Browsers.
Actually the next parameter was messing up the code in IE, so i removed the next parameter. What I did is storing the redirect back url in session and used a file to handle all facebook logins in all my domains.
http://digitalpbk.blogspot.com/2009/08/facebook-auth-next-parameter-ie.html