Where has 'Exclude URL query parameters' gone in GA4 - google-analytics-4

GA4 has removed Views. DAK where ‘Exclude URL query parameters’ (that is needed to remove Facebook’s fbclid) now lives - if at all?

Related

where is the “Recently Used”,“In Active Adverts”, "Action Needed", "Shared" filtering based from facebook custom audience data?

If you go to business manager of facebook, then go to the "All Audiences", then under the "Audiences" tab, you will see a "Filters" button right beside the "Create Audience" button. Now my question is, which part the json data being provided by the facebook apis should I based the data that I should pull out based from these filters ?
- Recently Used
- In Active Adverts
- Action Needed
- Shared
Because unlike the "ready" and "not ready" status, those four filters that I mentioned are not straight forward where I can just look for the numbers from the returned json data. so how ?
Most likely, not all of this information is available through the API.
However, if you take a look at the following doc, you can see some reelvant fields that may help:
https://developers.facebook.com/docs/marketing-api/reference/custom-audience
Most likely you can use the field operation_status to look at whether an audience needs action.
For whether it's shared, take a look ad the edge adaccounts which will let you see the ad accounts this audience has been shared with.
For recently used, you'll probably have to look at the edge ads and review the status of the ads.
To save having to make multiple requests, you can take a look at field expansion in the Graph API, which will let you query for fields of objects in results using a single request:
https://developers.facebook.com/docs/graph-api/using-graph-api#fieldexpansion

Why is the Graph API for querying a group URL simply returning the group ID?

When I GET /{group-id}?fields=link I get just get back {group-id}, rather than a full URL like in the case of /{album-id}?fields=link, /{photo-id}?fields=link, etc. Sample request and response for a group:
GET /v2.5/1685218945065439?fields=link
{
"id": "1685218945065439"
}
whereas an album looks like this:
GET /v2.5/1685219628398704?fields=link
{
"link": "https://www.facebook.com/media/set/?set=oa.1685219628398704&type=1",
"id": "1685219628398704"
}
According to the docs link is a valid field on the Group object. I'm using a token that has user_managed_groups. I see the same result when querying OPEN and CLOSED groups.
Just looking at the URLs of my groups by loading them in my web browser, I see that they all use the format https://www.facebook.com/groups/{group-id}/, so it's easy enough to build a URL from the {group-id}, but is that URL format something I can actually count on?
Using Graph API v2.5.
This is a field that is kept around for historical reasons. Back in the day you were able to actually set a website for a group, for example https://example.com.
This functionality has since been removed from the UI on facebook.com but the field in the API is present as older groups might have this value set, but newer groups won't have it anymore.
There has been a bug report about this as well which has been closed as 'By Design' for the reasons mentioned above https://developers.facebook.com/bugs/1495489670770155/
I filed a bug report to which the Facebook team responded that this is the intended behavior (also noted by Bjorn in his answer). See Bjorn's answer for more details.
The good news is that, according to the Facebook dev on that bug report, the format of the Group URL will always be https://www.facebook.com/groups/GROUP_ID, so there's really no need to query the API for the Group URL anyways.

Facebook Marketing API some field are not shown

I have a development level access to Marketing API and it looks like I cannot read some fields of specific objects.
For example I try the following call:
You can see that promoted_object, link_url and object_url are not displayed in the result. And I should have one of those three value as the Ads was ad to promote "web site click".
Is it a bug or a limitation of the development acces or I am doing something wrong?
It is true that not all fields are readable by all apps, however in the case above it is most likely that these fields are empty on that object and therefore not returned in the response.
Promoted object, for example, is required on the adset level now, however it may be the case the adset you are trying to read is very old and therefore does not have one specified.
In regards to the creative fields, again not all creatives have these fields and in the case they are empty, are not returned in the response. You should check the promoted_story_id to see if this contains what you're looking for.

Convert any facebook URL into a graph ID

Is there a simple, reliable and potentially future-proof way to extract a graph ID from the API given any facebook URL? By "any facebook URL" I mean the URL for a personal profile, page, group, etc. All these things have various formats so I imagine there must be something in the graph API to definitively convert a facebook URL into an ID, right?
No, there isn't a way to do this simply within the API. You will need a set of pattern matching to match the various types of urls to extract either the id (album,note,photo,status) or username.
For example
Photos
facebook.com/photo.php?fbid=10100213582161431&set=p.10100213582161431&type=1&theater
https://graph.facebook.com/10100213582161431
Posts
facebook.com/zuck/posts/10100210345757211
https://graph.facebook.com/10100210345757211
Pages
facebook.com/pages/Joel-Spolsky/106083232757300
graph.facebook.com/106083232757300
Videos
facebook.com/video/video.php?v=10150398154330484
graph.facebook.com/0150398154330484
Events
facebook.com/events/138745136241434/
etc ...
Then it gets further complicated that even if you were able to get a silver bullet function that handles all these links your app would need to grant access to numerous permissions in order to access certain objects.
You may be able to get away with most links that have the id at the end but not all. So you can maybe use a regular expression catching links that end in numeric characters.
There is! You are looking for the object_url table, which you can query using FQL or directly with a request. See here: http://developers.facebook.com/docs/reference/fql/object_url/
EDIT:
You can also do this, but obviously less optimal:
function getObjectByUrl(url, cb) {
FB.api("/" + url.replace(/^.*?www.facebook.com/, ""), cb);
}

What are the "base URLs" for status, photos, etc?

I developed an app that looks for specific terms using the facebook api (search).
Every result comes with an ID for the item that can be of many types like "status","photos",etc.
I remember that some time ago I could surf facebook and get this URLs from the browser address bar, but now with some updates that facebook has made it seems to be all AJAX based calls and it seems like you do not have a "specific page" for each item.
I looked over the web and could not find anything regarding this.
Is there any way I can get a "photo id" from the API and open it like "http://facebook.com/photos/0293820293842"?
Thanks for any clue.
https://graph.facebook.com/{id}/picture
https://graph.facebook.com/40796308305/picture (by page id)
https://graph.facebook.com/cocacola/picture (by page's name)
https://graph.facebook.com/4/picture (by user id)
https://graph.facebook.com/4/zuck (by user name)
after some time I just gave up trying to get the picture from the data provided by the search API.
From the api I get entries of type "photo" but they do not match with the API documentation found at http://developers.facebook.com/docs/reference/api/photo/ since I do not receive the fields "picture", "source" or "images" (they just does not exist in the results from a search)
Looking to find a way to use the approach of "setting up the URL from the fields received from the API" I could not get any sucess either.
That's one case... I set up a search for "pepsi"... and within the results I got a "photo" object.
In this object I have the following fields:
id: 100002307882828_188072634633218
author\id: 100002307882828
link : "http://www.facebook.com/photo.php?fbid=320417371337648&set=a.133681116677942.17717.131381520241235&type=1" (this link really points to the photo's page, but is not the photo itself)
object_id: 320417371337648
I used the URL you provided as a "base" and tried to setup some combination that returns me a photo but I always get "Content not found" as result.
The only way I could find the final photo URL is to make another call to the API using the Photo Id as parameter (but I would need to do a lot of calls to the API and this just do not fit my scenario)
If I call https://graph.facebook.com/320417371337648 I get everything I need from the photo, but this is the "another call" I would need to perform for each result I get.
Thanks a lot for your help,
Regards,
Victor Reboucas