목적지 광고에서는 네 가지 이벤트를 사용합니다. 모든 이벤트에는 매개변수 세트가 있습니다(전체 리스트는 이벤트 매개변수 상세 정보 참조). 웹사이트에서는 Meta 픽셀을 사용하고 Android 앱 및 iOS 앱에서는 모바일 앱 이벤트를 사용하세요. 표준 이벤트와 맞춤 이벤트에 대해 자세히 알아보세요.
이 가이드에서는 Facebook 픽셀이 이미 설치되어 있다고 가정합니다. 설치되어 있지 않은 경우 Facebook 픽셀로 마케팅 API 사용하기를 참조하세요.
이벤트를 실행할 때는 픽셀 기본 코드가 이미 로드되어 있어야 합니다. 태그 관리자를 사용하는 경우 모든 페이지에 픽셀 코드가 있는 태그를 포함하세요. 태그는 픽셀 이벤트 코드가 포함된 태그 앞에 표시되어야 합니다. 픽셀이 구현되는지 검증하려면 Facebook 픽셀 지원 도구를 사용하세요.
// This sample assumes the Meta Pixel base code is already loaded fbq('track', 'Search', { // Fire the 'Search' event on the search results page // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY // REQUIRED: city, don't use abbreviations city: 'New York', // REQUIRED: region, don't use abbreviations region: 'New York', // REQUIRED: country, don't use abbreviations country: 'United States', // RECOMMENDED: set to 'destination' content_type: 'destination', // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_start: '2018-04-01', // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_end: '2018-04-05', // RECOMMENDED: content ids - include eg top 5 search results content_ids: '["123", "234", "345", "456", "567"]', // RECOMMENDED: number of adults num_adults: 1, // RECOMMENDED: number of children num_children: 0 });
// This sample assumes the Meta Pixel base code is already loaded fbq('track', 'ViewContent', { // Fire the 'ViewContent' event on the destination details page // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY // REQUIRED: content id of destination that is shown content_ids: '123', // RECOMMENDED: set to : 'destination', // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_start: '2018-04-01', // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_end: '2018-04-05', // RECOMMENDED: city, don't use abbreviations city: 'New York', // RECOMMENDED: region, don't use abbreviations region: 'New York', // RECOMMENDED: country, don't use abbreviations country: 'United States', // RECOMMENDED: number of adults num_adults: 1, // RECOMMENDED: number of children num_children: 0 });
// This sample assumes the Meta Pixel base code is already loaded fbq('track', 'InitiateCheckout', { // Fire the 'InitiateCheckout' event when the user enters the payment screen // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY // REQUIRED: content id of destination that is being booked content_ids: '123', // REQUIRED: city, don't use abbreviations city: 'New York', // REQUIRED: region, don't use abbreviations region: 'New York', // REQUIRED: country, don't use abbreviations country: 'United States', // RECOMMENDED: set to 'destination' content_type: 'destination', // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_start: '2018-04-01', // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_end: '2018-04-05', // RECOMMENDED: number of adults num_adults: 1, // RECOMMENDED: number of children num_children: 0 });
// This sample assumes the Meta Pixel base code is already loaded fbq('track', 'Purchase', { // Fire the 'Purchase' event on the booking or purchase confirmation page // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY // REQUIRED: content id of destination that is being booked content_ids: '123', // REQUIRED: city, don't use abbreviations city: 'New York', // REQUIRED: region, don't use abbreviations region: 'New York', // REQUIRED: country, don't use abbreviations country: 'United States', // REQUIRED: total value of booking value: 1200, // REQUIRED: currency of booking currency: 'USD', // RECOMMENDED: set to 'destination' content_type: 'destination', // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_start: '2018-04-01', // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD travel_end: '2018-04-05', // RECOMMENDED: number of adults num_adults: 1, // RECOMMENDED: number of children num_children: 0 });
이 가이드에서는 Android 모바일 앱에서 Facebook SDK를 구현했다고 가정합니다. 구현하지 않은 경우 Android SDK를 참조하세요. 측정 파트너를 사용하는 경우 필수 이벤트를 Facebook에 전달해야 합니다.
Bundle parameters = new Bundle(); // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY // REQUIRED: city, don't use abbreviations parameters.putString("fb_city", "New York"); // REQUIRED: region, don't use abbreviations parameters.putString("fb_region", "New York"); // REQUIRED: country parameters.putString("fb_country", "United States"); // RECOMMENDED: set to 'destination' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "destination"); // 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: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_start", "2018-04-01"); // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_end", "2018-04-05"); // RECOMMENDED: number of adults parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children parameters.putInt("fb_num_children", 0); // Fire the 'Search' event on the search results page logger.logEvent( AppEventsConstants.EVENT_NAME_SEARCHED, parameters );
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 destination that is shown parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "123"); // RECOMMENDED: set to 'destination' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "destination"); // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_start", "2018-04-01"); // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_end", "2018-04-05"); // RECOMMENDED: city, don't use abbreviations parameters.putString("fb_city", "New York"); // RECOMMENDED: region, don't use abbreviations parameters.putString("fb_region", "New York"); // RECOMMENDED: country parameters.putString("fb_country", "United States"); // RECOMMENDED: number of adults parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children parameters.putInt("fb_num_children", 0); // Fire the 'ViewContent' event on the destination details page logger.logEvent( AppEventsConstants.EVENT_NAME_VIEWED_CONTENT, parameters );
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 destination that is being booked parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "123"); // RECOMMENDED: set to 'destination' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "destination"); // REQUIRED: city, don't use abbreviations parameters.putString("fb_city", "New York"); // REQUIRED: region, don't use abbreviations parameters.putString("fb_region", "New York"); // REQUIRED: country parameters.putString("fb_country", "United States"); // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_start", "2018-04-01"); // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_end", "2018-04-05"); // RECOMMENDED: number of adults parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children parameters.putInt("fb_num_children", 0); // Fire the 'InitiateCheckout' event when the user enters the payment screen logger.logEvent( AppEventsConstants.EVENT_NAME_INITIATED_CHECKOUT, parameters );
// total value of booking BigDecimal purchaseAmount = BigDecimal.valueOf(1200); // REQUIRED: currency of booking Currency currency = Currency.getInstance("USD"); 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 destination that is being booked parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "123"); // REQUIRED: city, don't use abbreviations parameters.putString("fb_city", "New York"); // REQUIRED: region, don't use abbreviations parameters.putString("fb_region", "New York"); // REQUIRED: country parameters.putString("fb_country", "United States"); // RECOMMENDED: set to 'destination' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "destination"); // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_start", "2018-04-01"); // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_travel_end", "2018-04-05"); // RECOMMENDED: number of adults parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children parameters.putInt("fb_num_children", 0); // Use the built-in SDK method when the booking is confirmed logger.logPurchase( purchaseAmount, currency, parameters );
이 가이드에서는 iOS 모바일 앱에서 이미 Facebook SDK를 구현했다고 가정합니다. 구현하지 않은 경우 iOS SDK를 참조하세요. 측정 파트너를 사용하는 경우 필수 이벤트를 Facebook에 전달해야 합니다.
// Fire the 'Search' event on the search results page [[FBSDKAppEvents shared] logEvent:FBSDKAppEventNameSearched // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY parameters:@{ // REQUIRED: city, don't use abbreviations @"fb_city" : @"New York", // REQUIRED: region, don't use abbreviations @"fb_region" : @"New York", // REQUIRED: country, don't use abbreviations @"fb_country" : @"United States", // RECOMMENDED: If sent, it must be set to 'destination' FBSDKAppEventParameterNameContentType : @"destination", // RECOMMENDED: content ids - include eg top 5 search results FBSDKAppEventParameterNameContentID : @"[\"123\", \"234\", \"345\", \"456\", \"567\"]", // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_start" : @"2018-04-01", // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_end" : @"2018-04-15", // RECOMMENDED: number of adults @"fb_num_adults" : @1, // RECOMMENDED: number of children @"fb_num_children" : @0 } ];
// Fire the 'ViewContent' event on the destination details page [[FBSDKAppEvents shared] logEvent:FBSDKAppEventNameViewedContent // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY parameters:@{ // REQUIRED: content id of destination that is shown FBSDKAppEventParameterNameContentID : @"123", // RECOMMENDED: If sent, it must be set to 'destination' FBSDKAppEventParameterNameContentType : @"destination", // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_start_date" : @"2018-04-01", // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_end_date" : @"2018-04-15", // RECOMMENDED: city, don't use abbreviations @"fb_city" : @"New York", // RECOMMENDED: region, don't use abbreviations @"fb_region" : @"New York", // RECOMMENDED: country, don't use abbreviations @"fb_country" : @"United States", // RECOMMENDED: number of adults @"fb_num_adults" : @1, // RECOMMENDED: number of children @"fb_num_children" : @0 } ];
// Fire the 'InitiateCheckout' event when the user enters the payment screen [[FBSDKAppEvents shared] logEvent:FBSDKAppEventNameInitiatedCheckout // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY parameters:@{ // REQUIRED: content id of destination that is being booked FBSDKAppEventParameterNameContentID : @"123", // RECOMMENDED: If sent, it must be set to 'destination' FBSDKAppEventParameterNameContentType : @"destination", // REQUIRED: city, don't use abbreviations @"fb_city" : @"New York", // REQUIRED: region, don't use abbreviations @"fb_region" : @"New York", // REQUIRED: country, don't use abbreviations @"fb_country" : @"United States", // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_start" : @"2018-04-01", // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_end" : @"2018-04-15", // RECOMMENDED: number of adults @"fb_num_adults" : @1, // RECOMMENDED: number of children @"fb_num_children" : @0 } ];
// Fire the 'Purchase' event when the booking is confirmed [[FBSDKAppEvents shared] logPurchase:1200 // currency of booking currency:@"USD" // IF YOU CHOOSE NOT TO USE A RECOMMENDED PARAM, THEN REMOVE IT, DON'T LEAVE IT EMPTY parameters:@{ // REQUIRED: content id of destination that is being booked FBSDKAppEventParameterNameContentID : @"123", // RECOMMENDED: If sent, it must be set to 'destination' FBSDKAppEventParameterNameContentType : @"destination", // REQUIRED: city, don't use abbreviations @"fb_city" : @"New York", // REQUIRED: region, don't use abbreviations @"fb_region" : @"New York", // REQUIRED: country, don't use abbreviations @"fb_country" : @"United States", // RECOMMENDED: travel start date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_start" : @"2018-04-01", // RECOMMENDED: travel end date // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_travel_end" : @"2018-04-15", // RECOMMENDED: number of adults @"fb_num_adults" : @1, // RECOMMENDED: number of children @"fb_num_children" : @0 } ];
모바일의 매개변수 이름은 Meta 픽셀의 매개변수 이름과 다릅니다. 일반적으로 앞에 fb_
가 붙습니다(예외: content_ids
대 fb_content_id
, value
대 _valueToSum
).
예를 들어 content_ids
또는 content_type
을 사용하여 여러 값을 보내는 경우 JSON 인코딩된 값의 배열을 제공하세요('["value1", "value2"]'
). 값을 쉼표로 연결하지 마세요.
매개변수 이름 및 유형 | 설명 |
---|---|
유형: 문자열 | 권장 사용. 사용자 여행의 시작 날짜. 예:
|
유형: 문자열 | 권장 사용. 사용자 여행의 종료 날짜. |
유형: 문자열 또는 문자열[] |
여행 카탈로그에 나열된 모든 관련 ID입니다. 예를 들어 예:
|
유형: 문자열 또는 문자열[] | 권장 사용. 전송하는 경우 |
유형: 문자열 |
사용자 여행 의향 정보에 기록된 위치의 도시를 제공합니다. 예: |
유형: 문자열 |
사용자 여행 의향 정보에 기록된 위치의 지역을 제공합니다. 예: |
유형: 문자열 |
사용자 여행 의향 정보에 기록된 위치의 국가를 제공합니다. 예: |
유형: 문자열 | 여행할 성인의 수입니다. 값을 제공할 경우 템플릿 태그를 사용하여 광고에 사용할 수 있습니다. 예: |
유형: 정수 | 여행할 어린이의 수입니다. 값을 제공할 경우 템플릿 태그를 사용하여 광고에 사용할 수 있습니다. 예: |
유형: 문자열 또는 문자열[ ] | 이 사용자에 대한 목적지 추천을 나타내는 ID의 리스트입니다. 이 매개변수는 예: |
유형: float` | 구매에 필수입니다. 총 예약금(광고주에 대한 이 이벤트의 가치를 수량화한 숫자)입니다. 예: |
유형: 문자열 | 구매에 필수이며, 값에 대한 통화입니다. ISO 4217 통화 형식을 사용하여 지정합니다. 예: |