skip to Main Content

I see that when creating an ad, I can define UTM Tags with the endpoint URL_Tags
=> https://developers.facebook.com/docs/marketing-api/reference/ad-creative/

But if I want to track the performance I am not able to get back the UTM
=> https://developers.facebook.com/docs/marketing-api/insights/parameters

I know that super-metrics are able to get the URL Tags… there is no reason that they can and not the US.
=> https://supermetrics.com/api/getFields?ds=FA&fieldType=dim

If I am reading well, facebook API insight is not able to get me the URL Tags. But is there a workaround? Maybe playing with Facebook ads create the function… a read after write method or something like that?

2

Answers


  1. Try this,

    1).The UTM tags + Facebook ads article explains clearly on Standardizing a UTM protocol

    2). For more on Track, FB Ads refer this article

    3). Get the UTM tags with Facebook Marketing API refer

    Login or Signup to reply.
  2. from facebook_business.adobjects.adaccount import AdAccount
    from facebook_business.adobjects.adcreative import AdCreative
    from facebook_business.api import FacebookAdsApi
    
    access_token = '<ACCESS_TOKEN>'
    app_secret = '<APP_SECRET>'
    app_id = '<APP_ID>'
    id = '<ID>'
    FacebookAdsApi.init(access_token=access_token)
    
    fields = [
      'name',
    ]
    params = {
    }
    print AdAccount(id).get_ad_creatives(
      fields=fields
    
    )
    

    Just replace your relevant details and add url_tags as a field under fields. You will be able to access all UTM params for every creative under your account.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search