汽车广告 - 事件

汽车广告使用的事件包含一组参数(事件参数详情的完整清单)。您可以在自己的网站上使用 Facebook Pixel 像素代码,在自己的 Android 应用和 iOS 应用中使用移动应用事件。

标准事件和必要事件

  • 标准事件是我们在所有广告产品中认可和支持的操作。我们对关键操作采用这种一致的命名和分类方法,这样就可以更有效地寻找受众中最有可能对业务采取重要操作的用户,并向他们投放广告。如需查看标准事件的完整清单和最佳实践,请点击此处
  • 必要事件 - 参阅下表。“代码示例”列提供了在使用 Pixel 像素代码、Android 应用与 iOS 应用时,所有必要事件的示例。
事件触发时间代码示例

Search

在汽车或库存搜索的搜索结果页面上

Pixel 像素代码 | Android | iOS

ViewContent

在要追踪关键内容浏览量的网页上。例如:汽车详情页面、型号页面、汽车优惠或奖励页面。

Pixel 像素代码 | Android | iOS

AddToWishlist

当用户保存或收藏特定车辆交易帖,或对特定车辆交易帖表现出兴趣时

Pixel 像素代码 | Android | iOS

Facebook Pixel 像素代码(对于网站)

此指南假设您已安装 Facebook Pixel 像素代码。如果尚未安装,请参阅将市场营销 API 与 Pixel 像素代码结合使用

准备工作

  • 确保触发事件前已加载 Pixel 像素基代码。
  • 如果您使用标签管理工具,应确保为网站的每个页面都添加包含 Pixel 像素代码的标签。此标签应先于包含 Pixel 像素代码事件代码的标签显示。
  • 使用 Facebook Pixel 像素代码帮手验证 Pixel 像素代码的实现情况。

Search Pixel 像素代码事件

    // This sample assumes the FB Pixel base code is already loaded

fbq('track', 'Search', {
      content_type: 'vehicle', // RECOMMENDED: If sent, it must be set to 'vehicle'
      content_ids: ['123'], // RECOMMENDED: array of vehicle IDs
      postal_code: '94025', // RECOMMENDED
      country: 'United States', // RECOMMENDED  don't use abbreviations
      make: 'Lexus', // RECOMMENDED
      model: 'ES', // RECOMMENDED
      year: '2017', // RECOMMENDED
      state_of_vehicle: 'CPO', // RECOMMENDED
      exterior_color: 'black', // RECOMMENDED
      transmission: 'automatic', // RECOMMENDED
      body_style: 'sedan', // RECOMMENDED
      fuel_type: 'gasoline', // RECOMMENDED
      drivetrain: 'awd', // RECOMMDENDED
      price: 1234.99, // RECOMMENDED, up to 2 decimals optional
      currency: 'USD', // REQUIRED if price and preferred_price_range is used, currency has to be the same for both price and preferred_price_range 
      preferred_price_range: '[10000,20000]' // Optional up to two decimals, min,max
});

ViewContent Pixel 像素代码事件

    // This sample assumes the FB Pixel base code is already loaded

fbq('track', 'ViewContent', {
      content_type: 'vehicle', // RECOMMENDED: If sent, it must be set to 'vehicle'
      content_ids: ['123'], // REQUIRED: array of vehicle IDs
      postal_code: '94025', // RECOMMENDED
      country: 'United States', // RECOMMENDED  don't use abbreviations
      make: 'Lexus', // RECOMMENDED
      model: 'ES', // RECOMMENDED
      year: '2017', // RECOMMENDED
      state_of_vehicle: 'CPO', // RECOMMENDED
      exterior_color: 'black', // RECOMMENDED
      transmission: 'automatic', // RECOMMENDED
      body_style: 'sedan', // RECOMMENDED
      fuel_type: 'gasoline', // RECOMMENDED
      drivetrain: 'awd', // RECOMMDENDED
      price: 1234.99, // RECOMMENDED, up to 2 decimals optional
      currency: 'USD', // REQUIRED if price and preferred_price_range is used 
      preferred_price_range: '[10000,20000]' // Optional up to two decimals, min,max
});

AddToWishlist Pixel 像素代码事件

// This sample assumes the FB Pixel base code is already loaded

fbq('track', 'AddToWishlist', {
      content_type: 'vehicle', // RECOMMENDED: If sent, it must be set to 'vehicle'
      content_ids: ['123'], // REQUIRED: array of vehicle IDs
      postal_code: '94025', // RECOMMENDED
      country: 'United States', // RECOMMENDED  don't use abbreviations
      make: 'Lexus', // RECOMMENDED
      model: 'ES', // RECOMMENDED
      year: '2017', // RECOMMENDED
      state_of_vehicle: 'CPO', // RECOMMENDED
      exterior_color: 'black', // RECOMMENDED
      transmission: 'automatic', // RECOMMENDED
      body_style: 'sedan', // RECOMMENDED
      fuel_type: 'gasoline', // RECOMMENDED
      drivetrain: 'awd', // RECOMMDENDED
      price: 1234.99, // RECOMMENDED, up to 2 decimals optional
      currency: 'USD', // REQUIRED if price and preferred_price_range is used 
      preferred_price_range: '[10000,20000]' // Optional up to two decimals, min,max
});

移动应用事件(对于 Android 应用)

此指南假设您已经在 Android 移动应用中实现了 Facebook SDK。如果尚未实现,请参阅 Android SDK。如果您与成效衡量合作伙伴合作,请确保他们会将必要事件传给 Facebook。

Search Android 事件

Bundle parameters = new Bundle();
// IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY

// RECOMMENDED: If sent, it must be set to 'vehicle'
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "vehicle");

// RECOMMENDED: content ids - include eg top 5 search results
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "[\"123\", \"234\", \"345\", \"456\", \"567\"]"); // top search results

// RECOMMENDED: postal_code
parameters.putString("fb_postal_code", "94025");

// RECOMMENDED: country
parameters.putString("fb_country", "United States");

// RECOMMENDED: make
// Allows you to target people based on their search of a specific make
parameters.putString("fb_make", "Lexus");

// RECOMMENDED: model
// Allows you to target people based on their search of a specific make model
parameters.putString("fb_model", "ES");

// RECOMMENDED: year, in yyyy format
// Allows you to target people based on their search for vehicles manufactured from a specific year
parameters.putInt("fb_year", "2017");

// RECOMMENDED: state_of_vehicle
// Allows you to target people based on their search of specific type of vehicle
parameters.putString("fb_state_of_vehicle", "CPO");

// RECOMMENDED: exterior_color
parameters.putString("fb_exterior_color", "black");

// RECOMMENDED: transmission
parameters.putString("fb_transmission", "automatic");

// RECOMMENDED: body_style
// Allows you to target people based on their search of a vehicle body style
parameters.putString("fb_body_style", "sedan");

// RECOMMENDED: fuel_type
parameters.putString("fb_fuel_type", "gasoline");

// RECOMMENDED: drivetrain
parameters.putString("fb_drivetrain", "awd");

// RECOMMENDED: price
parameters.putInt("fb_price", 1234.99);

// RECOMMENDED: currency
parameters.putInt("fb_currency", 'USD');

// RECOMMENDED: preferred_price_range
parameters.putInt("fb_preferred_price_range", '[10000,20000]');

// Fire the 'Search' event on the search results page
logger.logEvent(AppEventsConstants.EVENT_NAME_SEARCHED,
  parameters

);

ViewContent Android 事件

Bundle parameters = new Bundle();
// IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY

// REQUIRED: content id of the vehicle that is shown
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "123");

// RECOMMENDED: If sent, it must be set to 'vehicle'
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "vehicle");

// RECOMMENDED: postal_code
parameters.putString("fb_postal_code", "94025");

// RECOMMENDED: country
parameters.putString("fb_country", "United States");

// RECOMMENDED: make
// Allows you to target people based on their search of a specific make
parameters.putString("fb_make", "Lexus");

// RECOMMENDED: model
// Allows you to target people based on their search of a specific make model
parameters.putString("fb_model", "ES");

// RECOMMENDED: year, in yyyy format
// Allows you to target people based on their search for vehicles manufactured from a specific year
parameters.putInt("fb_year", "2017");

// RECOMMENDED: state_of_vehicle
// Allows you to target people based on their search of specific type of vehicle
parameters.putString("fb_state_of_vehicle", "CPO");

// RECOMMENDED: exterior_color
parameters.putString("fb_exterior_color", "black");

// RECOMMENDED: transmission
parameters.putString("fb_transmission", "automatic");

// RECOMMENDED: body_style
// Allows you to target people based on their search of a vehicle body style
parameters.putString("fb_body_style", "sedan");

// RECOMMENDED: fuel_type
parameters.putString("fb_fuel_type", "gasoline");

// RECOMMENDED: drivetrain
parameters.putString("fb_drivetrain", "awd");

// RECOMMENDED: price
parameters.putInt("fb_price", 1234.99);

// RECOMMENDED: currency
parameters.putInt("fb_currency", 'USD');

// RECOMMENDED: preferred_price_range
parameters.putInt("fb_preferred_price_range", '[10000,20000]');

// Fire the 'ViewContent' event on the vehicle details or other specific content page
logger.logEvent(AppEventsConstants.EVENT_NAME_VIEWED_CONTENT,
  parameters

);

AddToWishlist Android 事件

Bundle parameters = new Bundle();
// IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY

// REQUIRED: content id of the vehicle that is added to wishlist
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "123");

// RECOMMENDED: If sent, it must be set to 'vehicle'
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "vehicle");

// RECOMMENDED: postal_code
parameters.putString("fb_postal_code", "94025");

// RECOMMENDED: country
parameters.putString("fb_country", "United States");

// RECOMMENDED: make
// Allows you to target people based on their search of a specific make
parameters.putString("fb_make", "Lexus");

// RECOMMENDED: model
// Allows you to target people based on their search of a specific make model
parameters.putString("fb_model", "ES");

// RECOMMENDED: year, in yyyy format
// Allows you to target people based on their search for vehicles manufactured from a specific year
parameters.putInt("fb_year", "2017");

// RECOMMENDED: state_of_vehicle
// Allows you to target people based on their search of specific type of vehicle
parameters.putString("fb_state_of_vehicle", "CPO");

// RECOMMENDED: exterior_color
parameters.putString("fb_exterior_color", "black");

// RECOMMENDED: transmission
parameters.putString("fb_transmission", "automatic");

// RECOMMENDED: body_style
// Allows you to target people based on their search of a vehicle body style
parameters.putString("fb_body_style", "sedan");

// RECOMMENDED: fuel_type
parameters.putString("fb_fuel_type", "gasoline");

// RECOMMENDED: drivetrain
parameters.putString("fb_drivetrain", "awd");

// RECOMMENDED: price
parameters.putInt("fb_price", 1234.99);

// RECOMMENDED: currency
parameters.putInt("fb_currency", 'USD');

// RECOMMENDED: preferred_price_range
parameters.putInt("fb_preferred_price_range", '[10000,20000]');

// Fire the 'AddToWishlist' event on the vehicle details or other specific content page
logger.logEvent(AppEventsConstants.EVENT_NAME_ADDED_TO_WISHLIST,
  parameters

);

移动应用事件(对于 iOS 应用)

此指南假设您已经在 iOS 移动应用中实现了 Facebook SDK。如果尚未实现,请参阅 iOS SDK。如果您与成效衡量合作伙伴合作,请确保他们会将必要事件传给 Facebook。

Search iOS 事件

// Fire the 'Search' event on the search results page  
[FBSDKAppEvents logEvent:FBSDKAppEventNameSearched

// IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY
  parameters:@{
    // RECOMMENDED: If sent, it must be set to 'vehicle'
    FBSDKAppEventParameterNameContentType : @"vehicle",
    // RECOMMENDED: content ids - include eg top 5 search results
    FBSDKAppEventParameterNameContentID : @"[\"123\", \"234\", \"345\", \"456\", \"567\"]",

    // RECOMMENDED: postal_code    
    @"fb_postal_code" : @"94110",

    // RECOMMENDED: country
    @"fb_country" : @"US",
    
    // RECOMMENDED: make    
    // Allows you to target people based on their search of a specific make
    @"fb_make" : @"Toyota",
    
    // RECOMMENDED: model
    // Allows you to target people based on their search of a specific make model
    @"fb_model" : @"Camry",
    
    // RECOMMENDED: year, in yyyy format
    @"fb_year" : @"2015", 
        
    // RECOMMENDED: state_of_vehicle
    // Allows you to target people based on their search of specific type of vehicle
    @"fb_state_of_vehicle" : @"CPO",
    
    // RECOMMENDED: exterior_color
    @"fb_exterior_color" : @"black", 
    
    // RECOMMENDED: transmission
    @"fb_transmission" : @"automatic",
    
    // RECOMMENDED: body_style
    // Allows you to target people based on their search of a vehicle body style
    @"fb_body_style" : @"Sedan",
    
    // RECOMMENDED: fuel_type
    @"fb_fuel_type" : @"gasoline", 
    
    // RECOMMENDED: drivetrain
    @"fb_drivetrain" : @"awd", 
    
    // RECOMMENDED: price
    @"fb_price" : @18000, 
              
    // RECOMMENDED: currency
    @"fb_currency" : @"USD",

    // RECOMMENDED: preferred_price_range
    @"fb_preferred_price_range" : @"[10000,20000]",
    }
  ];          

ViewContent iOS 事件

// Fire the 'ViewContent' event on the search results page  
[FBSDKAppEvents logEvent:FBSDKAppEventNameViewedContent

// IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY
  parameters:@{
    // REQUIRED: content ids for vehicle shown
    FBSDKAppEventParameterNameContentID : @"123",  

    // RECOMMENDED: If sent, it must be set to 'vehicle'
    FBSDKAppEventParameterNameContentType : @"vehicle",

    // RECOMMENDED: postal_code    
    @"fb_postal_code" : @"94110",

    // RECOMMENDED: country
    @"fb_country" : @"US",

    // RECOMMENDED: make
    // Allows you to target people based on their search of a specific make
    @"fb_make" : @"Toyota",
    
    // RECOMMENDED: model
    // Allows you to target people based on their search of a specific make model
    @"fb_model" : @"Camry",
    
    // RECOMMENDED: year, in yyyy format
    @"fb_year" : @"2015", 
    
    // RECOMMENDED: body_style
    // Allows you to target people based on their search of a vehicle body style
    @"fb_body_style" : @"Sedan",
    
    // RECOMMENDED: state_of_vehicle
    // Allows you to target people based on their search of specific type of vehicle
    @"fb_state_of_vehicle" : @"CPO",  
    
    // RECOMMENDED: exterior_color
    @"fb_exterior_color" : @"black", 
    
    // RECOMMENDED: transmission
    @"fb_transmission" : @"automatic",  
    
    // RECOMMENDED: fuel_type
    @"fb_fuel_type" : @"gasoline", 
    
    // RECOMMENDED: drivetrain
    @"fb_drivetrain" : @"FWD", 
    
    // RECOMMENDED: price
    @"fb_price" : 18000, 
              

    }
  ];          

AddToWishlist iOS 事件

// Fire the 'AddToWishlist' event on the search results page  
[FBSDKAppEvents logEvent:FBSDKAppEventNameAddedToWishlist

// IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY
  parameters:@{
    // REQUIRED: content id of vehicle added to wishlist
    FBSDKAppEventParameterNameContentID : @"123",  

    // RECOMMENDED: If sent, it must be set to 'vehicle'
    FBSDKAppEventParameterNameContentType : @"vehicle",

    // RECOMMENDED: postal_code    
    @"fb_postal_code" : @"94110",

    // RECOMMENDED: country
    @"fb_country" : @"US",
    
    // RECOMMENDED: make
    // Allows you to target people based on their search of a specific make
    @"fb_make" : @"Toyota",
    
    // RECOMMENDED: model
    // Allows you to target people based on their search of a specific make model
    @"fb_model" : @"Camry",
    
    // RECOMMENDED: year, in yyyy format
    @"fb_year" : @"2015", 
    
    // RECOMMENDED: body_style
    // Allows you to target people based on their search of a vehicle body style
    @"fb_body_style" : @"Sedan",
    
    // RECOMMENDED: state_of_vehicle
    // Allows you to target people based on their search of specific type of vehicle
    @"fb_state_of_vehicle" : @"CPO",  
    
    // RECOMMENDED: exterior_color
    @"fb_exterior_color" : @"black", 
    
    // RECOMMENDED: transmission
    @"fb_transmission" : @"automatic",  
    
    // RECOMMENDED: fuel_type
    @"fb_fuel_type" : @"gasoline", 
    
    // RECOMMENDED: drivetrain
    @"fb_drivetrain" : @"FWD", 
    
    // RECOMMENDED: price
    @"fb_price" : 18000, 
              

    }
  ];          

Pixel 像素代码和应用事件的参数

虽然每位汽车广告主可能对网站具有略微不同的目标或自定义追踪需求,我们还是在下表中根据与汽车网站相关的最常见操作和 KPI,提供了一些建议的参数。

参数是一个标准事件的子集,可追踪每个操作的更多信息。例如,如果您正在追踪汽车详情页面 (VDP) 上的 ViewContent 事件,通过使用参数,您还可以在用户每次查看该页面时获取相关汽车的品牌、型号和年份等信息。

虽然对于一般 Pixel 像素代码设置,参数是可选项,但是就汽车广告而言,其中一些特定参数是必要项。建议至少添加必要参数,以便现在或将来更轻松地设置 DAA。

应用事件参数规范

  • 与 Facebook Pixel 像素代码相比,移动端的参数名称有所不同。通常以 fb_ 开头,但有一些例外,例如 content_idsfb_content_idvalue_valueToSum
  • 在发送多个值(例如在 content_idscontent_type 中提供多个值)时,请提供由这些值组成的一个 JSON 编码数组:["value1", "value2"]注意:请勿用逗号来连接值。
字段和类型描述

event_name

类型:字符串

对于 SearchViewContentAddToWishlist必要项

预定义事件名称,您可通过这些名称衡量广告系列的表现以及捕获受众的意向。

content_ids

类型:由字符串组成的数组

对于 ViewContentAddToWishlist必要项建议 Search 添加此字段。

汽车目录中列出的相关编号。

示例:['123', 456]

content_type

类型:字符串

建议 SearchViewContentAddToWishlist 添加此字段。

商品或内容的类型。支持的值:value

postal_code

类型:字符串

建议添加

汽车所在位置的邮政编码。

示例:94112

country

类型:字符串

建议添加

汽车所在位置的国家/地区名称。

示例:New Zealand

make

类型:字符串

建议添加

汽车的品牌/制造商。

示例:FordToyotaHonda

model

类型:字符串

建议添加

汽车型号。

示例:F-150CamryAccord

year

类型:整数

建议添加

汽车上市年份,格式为 yyyy

示例:2013

state_of_vehicle

类型:枚举

建议添加

表示汽车是新车还是二手车的关键参数。支持的值:NewUsedCPO

mileage.value

类型:整数

建议添加

汽车里程(以公里或英里为单位);新车的值为零 (0)。

示例:5000

mileage.unit

类型:字符串

建议添加

里程单位:英里 (MI) 或公里 (KM)

exterior_color

类型:字符串

建议添加

汽车的外观颜色。

示例:blackbluewhite

transmission

类型:枚举

建议添加

汽车的变速器类型。支持的值:AutomaticManualOther

body_style

类型:枚举

建议添加

车身样式。支持的值:ConvertibleCoupeHatchbackMinivanTruckSUVSedanVanWagonCrossoverOther

fuel_type

类型:枚举

建议添加

汽车的燃料类型。支持的值:DieselElectricFlexGasolineHybridOther

drivetrain

类型:枚举

建议添加

汽车的传动系统。支持的值:AWDFOUR_WDFWDRWDTWO_WDOther

price

类型:浮点数

建议添加

汽车价格。

示例:8000

preferred_price_range

类型:[浮点数(最小值), 浮点数(最大值)]

建议添加

汽车价格范围。

示例:[8000, 12000]

currency

类型:字符串

建议添加

priceprice_range 的货币单位。使用 ISO 4217 货币格式,例如“USD”。

trim

类型:字符串

建议添加

汽车配置。

示例:5DR HB SE

vin

类型:字符串

建议添加

汽车识别码。不超过 17 个字符。

示例:KL9CD9S99EC111111

interior_color

类型:字符串

可选

汽车内饰颜色。

示例:BlackWhiteBlue

condition_of_vehicle

类型:枚举

可选

汽车的物理状况。支持的值:ExcellentGoodFairPoorOther

viewcontent_type

类型:字符串

对于 ViewContent 是可选项

使用 viewcontent_type 区分不同的潜在客户软落地页。

示例:Model PageOffers Page

search_type

类型:字符串

对于 Search 是可选项

使用 search_type 将其他用户搜索(例如经销商查找)与库存搜索区分开来。

示例:Dealer Locator

registriation_type

类型:字符串

对于 CompleteRegistration 是可选项

使用 registriation_type 区分网站上的不同客户注册类型。

示例:Brochure request