facebook-python-business-sdk icon indicating copy to clipboard operation
facebook-python-business-sdk copied to clipboard

Added method to get custom conversions for ad account

Open karnstrand opened this issue 8 years ago • 8 comments

This functionality was not present in the python sdk previously

karnstrand avatar May 17 '16 11:05 karnstrand

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

ghost avatar May 17 '16 12:05 ghost

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

ghost avatar Jul 12 '16 20:07 ghost

Hi karnstrand,

Thanks for creating the function, could you please post some sample code for it e.g.

from facebookads.adobjects.ad import Ad

ad = Ad(parent_id='act_<AD_ACCOUNT_ID>')
ad.update({
    Ad.Field.adset_id: <AD_SET_ID>,
    Ad.Field.name: 'Offsite Conversions Ad',
    Ad.Field.creative: {
        'creative_id': <CREATIVE_ID>,
    },
    Ad.Field.tracking_specs: [
        {
            'action.type': 'offsite_conversion',
            'fb_pixel': <PIXEL_ID>,
        },
    ],
})
ad.remote_create(params={
    'status': Ad.Status.paused,
})

Thanks in advance.

Arsalan-Baig avatar Sep 29 '16 18:09 Arsalan-Baig

from facebookads.adobjects.adaccount import AdAccount

account = AdAccount('act_<AD_ACCOUNT_ID>')
conversions = account.get_custom_conversions(fields=[
    'id', 
    'name', 
    'custom_event_type', 
    'pixel_rule'
])

karnstrand avatar Nov 28 '16 13:11 karnstrand

why wasn't this merged?

guyschlider avatar Mar 21 '17 08:03 guyschlider

Any update on this?

jatinder85 avatar Jun 01 '17 00:06 jatinder85

Sorry @karnstrand, we cannot accept the pull request on auto-generated files. All the auto-generated files have the following comments at the beginning of files. We need some time to update the internal data and make the method available for supported all languages.

""" This class is auto-generated. For any issues or feature requests related to this class, please let us know on github and we'll fix in our codegen framework. We'll not be able to accept pull request for this class. """

guxufb avatar Jun 01 '17 00:06 guxufb

So was it merged? don't see this functionality in 2.11 :(

stajilov avatar Nov 20 '17 12:11 stajilov