Cmdlets for Facebook Ads

Build 24.0.8963

CustomConversions

Query information about custom conversions defined for your ad accounts.

Table Specific Information

Custom conversions in Facebook represent conversion events to optimize ad delivery.

Insert

When inserting CustomConversions, at least a name must be specified:

INSERT INTO CustomConversions (Name) VALUES ('TestConversion')

If inserting to the Rule or AdvancedRule columns, the rule configuration should be specified as a JSON aggregate:

INSERT INTO CustomConversions (Name, EventSourceId, Rule, CustomEventType) 
VALUES 
 ('test',
 '871481174114636',
 '{"and":[{"event":{"eq": "Purchase"}},{"value":{"gt":100}}]}',
 'PURCHASE')

See the Facebook Marketing API documentation on CustomConversions for all available Rule configurations.

Update

When updating CustomConversions, the ID of the object must be specified in the WHERE clause:

UPDATE CustomConversions SET Name='test1' WHERE ID='123abc'

Note: The Facebook Marketing API only supports updates on the DefaultConversionValue, Name, and Description columns.

Delete

When deleting CustomConversions, the Id of the object should be specified:

DELETE FROM CustomConversions WHERE ID='123abc'

Columns

Name Type ReadOnly Description
ID [KEY] String True

The ID of the custom conversion

Account_ID String True

The ID of the custom conversion's ad account

BusinessID String True

ID of business that owns the custom conversion

BusinessName String True

Name of business that owns the custom conversion

CreationTime Datetime True

Time at which the conversion was created

CustomEventType String False

The type of the conversion event

The allowed values are ADD_PAYMENT_INFO, ADD_TO_CART, ADD_TO_WISHLIST, COMPLETE_REGISTRATION, CONTENT_VIEW, INITIATED_CHECKOUT, LEAD, PURCHASE, SEARCH, CONTACT, CUSTOMIZE_PRODUCT, DONATE, FIND_LOCATION, SCHEDULE, START_TRIAL, SUBMIT_APPLICATION, SUBSCRIBE, LISTING_INTERACTION, FACEBOOK_SELECTED, OTHER.

DataSourcesId String True

ID for event sources of the custom conversion

DataSourcesName String True

Name for event sources of the custom conversion

DataSourcesSourceType String True

Source type for event sources of the custom conversion

DefaultConversionValue Decimal False

When conversion is URL based, the default conversion value associated to each conversion

Description String False

Description of the custom conversion

EventSourceType String True

Event source type of the custom conversion, e.g. pixel, app, etc.

FirstTimeFired Datetime True

Time at which the pixel was first fired

IsArchived Boolean True

Whether this conversion is archived. Archived conversions are no longer tracked in the system.

IsUnavailable Boolean True

Whether this conversion is unavailable

LastFiredTime Datetime True

Time at which the pixel was last fired

Name String False

Name of the custom conversion

OfflineConversionDataSet String True

The offline event set that contains events

PixelID String True

ID of the pixel that will send events

RetentionDays Integer True

Retention period for advanced rule

Rule String False

Rule of the custom conversion

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.

Name Type Description
EventSourceId String

Event source Id.

AdvancedRule String

Advanced ruleset for the custom conversion being created allowing multiple sources.

ActionSourceType String

Action source type the custom conversion is created from.

The allowed values are app, chat, email, other, phone_call, physical_store, system_generated, website, business_messaging.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.8963