Skip to content

Latest commit

 

History

History
74 lines (68 loc) · 5.56 KB

File metadata and controls

74 lines (68 loc) · 5.56 KB

Zernio::Ad

Properties

Name Type Description Notes
_id String [optional]
name String [optional]
platform String [optional]
status AdStatus [optional]
ad_type String [optional]
goal String Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views. [optional]
is_external Boolean True for ads synced from platform ad managers [optional]
budget AdBudget [optional]
metrics AdMetrics [optional]
platform_ad_id String [optional]
platform_ad_account_id String [optional]
platform_campaign_id String [optional]
platform_ad_set_id String [optional]
campaign_name String [optional]
ad_set_name String [optional]
platform_objective String Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC). Only present for Meta ads. [optional]
optimization_goal String Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION, LINK_CLICKS). Only present for Meta ads. [optional]
platform_ad_account_name String Human-readable advertiser/account name (Meta `AdAccount.name`, TikTok `advertiser_name`, LinkedIn / X / Pinterest equivalents). Refreshed every sync so platform-side renames propagate within one cycle. `null` when the platform doesn't return a name or the sync hasn't run yet. [optional]
platform_created_at Time Platform-reported creation timestamp (Meta `created_time`, TikTok `create_time`). Distinct from `createdAt` which reflects when Zernio first synced the doc — for sort/filter by "when the ad was actually created on the platform", read this field. `null` for legacy ads synced before this field was added; aggregations fall back to `createdAt` in that case. [optional]
bid_strategy BidStrategy [optional]
bid_amount Float Bid cap in WHOLE currency units of the ad account (USD: 5 = $5.00; JPY: 100 = ¥100). Populated when bidStrategy is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. `null` for auto-bid (`LOWEST_COST_WITHOUT_CAP`). - Meta source: `bid_amount` on the ad set (smallest-denomination int, decoded here). - TikTok source: priority order `bid_price` -> `conversion_bid_price` -> `deep_cpa_bid` (whichever is set on the ad group). TikTok stores all three in whole currency units. Source: facebook-business-sdk-codegen api_specs/specs/AdSet.json (`bid_amount`). [optional]
roas_average_floor Float Minimum ROAS as a decimal multiplier (2.0 = 2.0x ROAS). Populated when bidStrategy is `LOWEST_COST_WITH_MIN_ROAS`. - Meta source: decoded from `bid_constraints.roas_average_floor` (Meta stores as fixed-point int × 10000; we return the decimal). - TikTok source: `roas_bid` on the ad group (already a decimal). Source: facebook-business-sdk-codegen api_specs/specs/AdCampaignBidConstraint.json. [optional]
promoted_object AdPromotedObject [optional]
creative AdCreative [optional]
targeting Object The ad set's targeting (age, gender, geo, interests, placements, audience inclusions/exclusions). For ads created through Zernio this is the spec you supplied. For external ads (synced from Meta Ads Manager, `isExternal: true`) targeting lives at the ad set and isn't stored at ingest, so on the first `GET /v1/ads/{adId}` Zernio resolves it live from Meta and caches it on the ad; the value is then Meta's raw `targeting` shape (snake_case, e.g. `geo_locations`, `age_min`), the same object Ads Manager shows. May be absent if the ad set exposes no targeting or the lookup fails. [optional]
schedule AdSchedule [optional]
rejection_reason String [optional]
created_at Time [optional]
updated_at Time [optional]

Example

require 'zernio-sdk'

instance = Zernio::Ad.new(
  _id: null,
  name: null,
  platform: null,
  status: null,
  ad_type: null,
  goal: null,
  is_external: null,
  budget: null,
  metrics: null,
  platform_ad_id: null,
  platform_ad_account_id: null,
  platform_campaign_id: null,
  platform_ad_set_id: null,
  campaign_name: null,
  ad_set_name: null,
  platform_objective: OUTCOME_SALES,
  optimization_goal: OFFSITE_CONVERSIONS,
  platform_ad_account_name: Zernio - previously Late,
  platform_created_at: null,
  bid_strategy: null,
  bid_amount: 5,
  roas_average_floor: 2.0,
  promoted_object: null,
  creative: null,
  targeting: null,
  schedule: null,
  rejection_reason: null,
  created_at: null,
  updated_at: null
)