Event API Integration Guide
I. Overview
The Bigo Ads Web Events API is designed to provide a reliable link between Bigo and advertisers' marketing data, allowing for more effective measurement of ad impact on the Bigo platform.
II. Process Description
- Users enter through the ad landing page and complete a conversion action (e.g., payment completed).
- Advertisers use the Bigo Ads Event API to communicate user conversion actions to Bigo Ads.
III. BIGO Ads Website Event API and Parameter Requirements
Advisable format for advertisers to submit data to BIGO Ads is as follows.
Address
https://api.bytegle.site/bigoad/trackingevent
Mode 1
- Request Method: POST
- Content-Type: application/json
Mode 2
- Request Method: GET (parameters are spliced after the URL)
Interface parameters
Header
Fields | Type | Description | Required or not |
Content-Type | String | Request Information Type Option: application/json | Required for Post mode |
Body Parameters
Fields | Body Parameters | Description | Required or not |
bbg | String | Bigo ad attribution identifier. Retrieve the value from the key "bbg" in the URL of the ad landing page or from the key "_bge_bbg" in the cookie. Attention: Please retrieve the bbg content according to the original data length. Truncation may result in an "invalid bbg / invalid bgg id" error. | Y |
pixel_id | String | Pixel ID. Retrieved from key=pixel_id in the ad landing page url or pixel events in Bigo Ads when you creat.![]() | Y |
timestamp_ms | Number | Millisecond timestamp of the event. | |
url | String | The URL of the page where the event occurred. The Get method requires UrlEncode. | |
referer | String | The source of the page referral. Get method requires UrlEncode. | |
ip | String | The IP address of the browser. It needs to be a public IP and not encrypted. We recommend sending both ip and user_agent. | |
user_agent | String | Non-encrypted user agent on the user's device. | |
external_id | String | User identifier on advertiser side, such as member ID, user ID, external cookie ID. | |
String | User's email address. | ||
phone_number | String | Phone number of the user.For example, if your phone number is caller_id, you can encrypt caller_id and then map it to this parameter. | |
cookie_id | String | Get key=_bge_ci from cookie when using Bigo PIxel. | |
event | Object | Event related parameters, refer to event object parameters below. Get request to splice the fields from event to url. |
Event Object Parameters
Fields | type | Description | Required or not |
event_id | String | Web event, refer to the supported web events. | Y |
monetary | String | The value of the order or sold goods (in USD) should be in integer or decimal format (e.g., 10.00). Currency symbols, special characters, letters or commas are not allowed. | |
currency | String | Original currency | |
orig_monetary | String | The value of the order or item in the original currency should be in integer or decimal format (e.g. 10.00). Currency symbols, special characters, letters or commas are not allowed. |
Cookie Parsing Method
function getCookie(name) {
let cookie = {};
document.cookie.split(';').forEach(function(el) {
let [k, v] = el.split('=');
cookie[k.trim()] = v;
});
return cookie[name];
}
getCookie('_bge_bbg') // flag of Bigo Ad attribution
getCookie('_bge_ci') // Cookie id
Interface example (note: You should substitute the placeholder data in the example with your actual information)
- HTTP GET example
curl https://api.bytegle.site/bigoad/trackingevent?bbg=EigyQTE1MEM1RTRFQzQxODZBMEEyOEZCMzA4QTExQkM5RjhCRUZEMTY0GL76naYGIh05MDM3MDIzNjYwNTE2MDU1MDRfdGVzdF8wsi9aWQqEjkwMzcwMjM2NjA1MTYwNTUwNDgB&pixel_id=903702366051605504&event_id=ec_register
- HTTP POST example
curl --location --request POST 'https://api.bytegle.site/bigoad/trackingevent' \
--header 'Content-Type: application/json' \
--data-raw '{
"bbg": "EigyQTE1MEM1RTRFQzQxODZBMEEyOEZCMzA4QTExQkM5RjhCRUZEMTY0GL76naYGIh05MDM3MDIzNjYwNTE2MDU1MDRfdGVzdF8wsi9aWQqEjkwMzcwMjM2NjA1MTYwNTUwNDgB",
"pixel_id": "903702366051605504",
"timestamp_ms": 1691069085365,
"event": {
"event_id": "ec_register"
}
}'
Return parameter: JSON format
Parameter name | type | Description |
code | Code | 1 means success, non-zero means failure Where: -1: Indicates an internal server-side exception -4: indicates a parameter error |
msg | String | Error message. Common errors: 1: need pixel_id: the parameter has no pixel_id 1. invalid bbg / invalid bgg id: invalid bbg 2. notfound pixel: Unsupported pixel_id 3. invalid event_id: unsupported event_id |
logid | Number(Uint64) | Log id. Uniquely identifies a request |
timestamp | Number | Timestamp |
Example:
{
"code": 1,
"msg": "success",
"logid": 739903845363969760,
"timestamp": 1691149150
}
Macros supported advertising informations
Macro | Description |
---|---|
__ACCOUNT_ID__ | Ad account ID |
__CAMPAIGN_ID__ | Ad campaign ID |
__CAMPAIGN_NAME__ | Ad series name |
__AD_GROUP_ID__ | Ad group ID |
__GROUP_NAME__ | Ad Group Name |
__AD_ID__ | Ad ID |
__AD_NAME__ | Ad Name |
__PUBLISHER_ID__ | The channel ID for advertising placement |
__SUB_PUBLISHER_ID__ | The sub-channel ID for advertising placement |
__BBG__ | bbg |
__PIXEL_ID__ | pixelid |
__IDFA__ | IOS Identifier for Advertisers |
__GAID__ | Android Identifier for Advertisers |
__OS__ | iOS/Android |
Supported web events
Value(fixed) | Event Name |
page_view | Page View |
button | Button Click |
consult | Online Consultation |
ec_register | User Registration |
ec_detail_view | Product Detail Page Browse |
ec_add_cart | Add to cart |
ec_order | Place an order |
ec_purchase | Complete Payment |
form_button | Button click (Form) |
form_detail | Detail page browse (Form) |
form | Form Submission |
phone_button | Button click (Consultation) |
phone_detail | Detail page browse (Consultation) |
phone_consult | Phone Consultation |
app_button | Button click (App download) |
app_detail | Details Page Browse (Application download) |
app_download | Download Button Click |
ad_watch | ad watch |
IV. Ad account set-up
After postback set up is ready by your tech team, you could set up in your ad account.
1. Create a pixel
1)Log in to your ad account, create a pixel through [Library] - [Website Pixel].
2)Name your pixel, choose [Event API integration].
3)keep events that you are going to postback in the list, define if you want to see event number record every time or unique by user, and submit.
4)get your pixel id here:
2. Create campaigns with your pixel
1)create campaigns with [Conversions] as advertising objective
2)When creating ad groups, fill in your landing page, turn [ON] of the website pixel and choose the optimization event.
3)Finish the rest and submit