When I edit an ad on business.facebook.com, I can see a “Tracking” section where there is a field called “URL Parameters”.
I am trying to get the value of that field using the (Graph or Marketing) API, but after reading a lot I can’t find a way of achieve that.
Does somebody know if that is even possible?
3
Answers
See the “Ad Creative” object, “URL Tags” field.
More info here: https://developers.facebook.com/docs/marketing-api/reference/ad-creative
Whoops, that seems to be for writing only. It seems like that field is always empty when reading objects. 🙁
Disclaimer: I’m still pretty new to intermediate graph API usage, but this is what I figured out so far.
The python page seems to give all the fields in a nice long list, so I copy and pasted those into the API URL:
So something like this (spaces are ok):
This gives me the full tree:
So now I know it CAN be returned and most definitely is not write-only.
After playing some more I found that it’s the SINGLE field
object_story_spec
that returns ALL this:So perhaps fields like
link
andobject_id
aren’t for the type of ad I am using (mostly video with link to website) – or perhaps they are just for creating an ad – but I don’t really care because now I have the data I need.I’m using https://developers.facebook.com/tools/explorer for this
You can find this information under "url_tags" on the Ad Creative level through Graph API.
Official Documentation: https://developers.facebook.com/docs/marketing-api/reference/ad-creative/#fields