OpenAI Ads Cloud Mode Integration Private Beta
3 minute read
The OpenAI Ads destination is currently in Private Beta, where we work with early users and customers to test new features and get feedback before making them generally available.
Reach out to Customer Success if you’re interested in enabling this destination for your workspace.
After you have successfully instrumented OpenAI Ads as a destination in RudderStack, follow this guide to correctly send your events to OpenAI Ads in cloud mode.
Find the open source transformer code for this destination in the GitHub repository.
Track
Use the track call to send conversion events to OpenAI Ads.
A sample track call is shown below:
rudderanalytics.track("Order Completed", {
orderId: "order-123",
revenue: 49.99,
currency: "USD",
action_source: "web",
source_url: "https://www.example.com/checkout/success",
products: [
{
product_id: "sku-123",
name: "T-shirt",
category: "Apparel",
quantity: 1,
price: 49.99,
},
],
});Event mapping
RudderStack uses your event mapping settings to resolve the OpenAI Ads event type for each track event.
- If a configured mapping matches the RudderStack event name, RudderStack sends the event to the mapped OpenAI Ads standard or custom event.
- If no mapping matches and the RudderStack event name already matches a standard OpenAI Ads event ID, such as
order_created, RudderStack sends it as that standard event. - If no mapping matches and the event name is not a standard OpenAI Ads event ID, RudderStack rejects the event.
Page
Use the page call to send web page view events to OpenAI Ads.
A sample page call is shown below:
rudderanalytics.page("Product", "Product Viewed", {
url: "https://www.example.com/products/sku-123",
});RudderStack resolves page events using your event mapping settings. Unmapped page events default to the OpenAI Ads page_viewed event.
Screen
Use the screen call to send mobile screen view events to OpenAI Ads through cloud mode.
A sample screen call is shown below:
rudderanalytics.screen("Home", "Home Viewed");RudderStack resolves screen events using your event mapping settings. Unmapped screen events default to the OpenAI Ads page_viewed event.
Event data fields
RudderStack maps the following top-level event fields to OpenAI Ads:
| RudderStack property | OpenAI Ads field | Notes |
|---|---|---|
properties.action_sourceproperties.actionSourceDefault action source setting | action_source | Optional. Supported values are web, mobile_app, offline, physical_store, phone_call, email, and other. |
properties.source_urlproperties.sourceUrlcontext.page.url | source_url | Required when action_source is web. |
properties.oppref | oppref | Optional OpenAI Ads reference value. |
properties.optOutproperties.opt_out | opt_out | Optional boolean value. |
RudderStack maps the following event data fields:
| RudderStack property | OpenAI Ads field | Notes |
|---|---|---|
properties.amountproperties.valueproperties.revenue | data.amount | Converted to the currency’s minor units when currency is available. |
properties.currencyDefault currency setting | data.currency | Required when amount is present. |
properties.contentsproperties.products | data.contents | Sent for contents, plan_enrollment, and custom event data shapes. Not sent for customer_action events. |
For each item in properties.contents or properties.products, RudderStack maps the following fields:
| RudderStack property | OpenAI Ads field |
|---|---|
idcontent_idcontentIditem_iditemIdproduct_idproductIdsku | id |
nametitleproduct_nameproductName | name |
content_typecontentTypetypecategoryproduct_category | content_type |
group_idgroupId | group_id |
variant_dictvariantDict | variant_dict |
quantitycount | quantity |
amountvalueprice | amount |
currencycurrency_codecurrencyCode | currency |
User matching fields
RudderStack hashes the following user matching fields before sending them to OpenAI Ads:
| RudderStack property | OpenAI Ads field |
|---|---|
traits.emailscontext.traits.emailstraits.emailcontext.traits.email | emails_sha256 |
traits.phoneNumberscontext.traits.phoneNumberstraits.phone_numberscontext.traits.phone_numberstraits.phonescontext.traits.phonestraits.phonecontext.traits.phone | phone_numbers_sha256 |
userIdanonymousId | external_ids_sha256 |
traits.firstNamescontext.traits.firstNamestraits.first_namescontext.traits.first_namestraits.firstNametraits.first_namecontext.traits.firstNamecontext.traits.first_name | first_names_sha256 |
traits.lastNamescontext.traits.lastNamestraits.last_namescontext.traits.last_namestraits.lastNametraits.last_namecontext.traits.lastNamecontext.traits.last_name | last_names_sha256 |
RudderStack rejects apparent pre-hashed values passed into non-hashed fields. Use the non-hashed source fields listed above and let RudderStack normalize and hash them.
RudderStack also forwards the following non-hashed matching fields when present: regions, postal_codes, cities, countries, obref, android_advertising_id, ip_address, and user_agent.