Implement a pixel and/or mobile SDK for dynamic ads for automotive
Set up or modify your pixel
Create a Facebook pixel
- Go to your Pixels tab in Events Manager.
- Click Create a Pixel.
- To finish creating your pixel, click Create in the box that appears.
Add the Facebook pixel to your website
Once you've created your pixel, you're ready to put the Facebook pixel code on your website. Choose the statement below that best fits how you make updates to your website's code for instructions:
If someone else updates the code in your website, then follow the steps below to email them instructions to set up the Facebook pixel on your site.
- Go to the Pixels tab in Ads Manager.
- Click Set Up Pixel
- Click Email Instructions to a Developer.
- Enter the recipient's email address.
- Click Send at the bottom of the page.
- Locate the header code for your website
- Copy the entire code and paste it in the header of your website
- Check that your code's working correctly
Go to your website's code and find the header of your website.
Paste the code at the bottom of the header section, just above the closing head tag.
Click Send Test Traffic after placing the code on your website to make sure your pixel's working properly. If your status says "Active", your base code has been installed correctly. This can take several minutes to update.
Select your platform or tag manager from this list for an even easier way to set up your pixel. If you can't see your platform here, then take a look at one of the other two ways of setting up your pixel above.
Website platforms:
Tag managers
Learn more about the benefits of using a third-party platform to set up your pixel.
- ViewContent, to track viewing a vehicle detail page.
- Search, to track interest in vehicles.
- AddToWishlist, to track vehicles that have been favourited/starred or have experienced an intention to purchase.
Lead, to track submission of a lead.
These events should be accompanied by specific parameters that provide additional, useful information. Note: Required and recommended parameters are listed in the chart below; for a complete list of parameters, visit our developers' site.
On each page, add the appropriate standard events. These standard events must be added exactly as described below, with no variations in spelling or case. Make sure that you're looking at the standard events for the type of inventory you're using; in this case, you'd use the standard events for vehicles.
Standard events
Event | Description |
---|---|
ViewContent | Someone viewed a specific listing |
Search | Someone searched vehicle listings |
AddToWishlist | Someone saved, liked or showed special interest in a listing |
Lead | Someone contacted an agent about a listing |
Event parameters
Field name | Type | Required | Example |
---|---|---|---|
content_type | string | yes | vehicle |
content_ids | array of strings | yes | ['123', 456] |
postal_code | string | no | NW1 3FF |
make | string | no | Acura |
model | string | no | MDX |
year | int | no | 2015 |
vin | string | no | KL8CD6S99EC577334 |
state_of_vehicle | enum | no | new |
exterior_color | string | no | black |
transmission | enum | no | Automatic |
body_style | enum | no | saloon |
fuel_type | enum | no | Diesel |
drivetrain | enum | no | AWD |
price | float | no | 2000 |
preferred_price_range | [float (min), float (max)] | no | Price range of the vehicle [10000.99, 20000.99] |
currency | string | no | Currency for the price . Specified using ISO 4217 currency format, e.g. USD . |
On each page, add the appropriate standard events. These standard events must be added exactly as described below, with no variations in spelling or case. Make sure that you're looking at the standard events for the type of inventory that you're using; in this case, you'd use the standard events for automotive.
The content ID reported from the Facebook pixel must correspond to the ID column from the catalogue. You can also send multiple product IDs per page by sending an array.
Refer to the developers' site for definitions and additional formatting requirements for pixel parameters and/or more details on adding these four custom data events.
Refer to our developer site for definitions and additional formatting requirements for pixel parameters.
Many tag management providers have integrated with Facebook to make it easier to set up Custom Audiences from your website and dynamic ads. Please contact your tag management partner directly to learn how to modify your tag to work with Facebook dynamic ads. You can also place the Facebook pixel code directly on your site.
Verify your pixel implementation
We recommend using Facebook's Pixel Helper to verify that your pixel has been set up correctly to use dynamic ads for automotive.
The Facebook Pixel Helper helps you to confirm that your Facebook pixels are working as expected. Learn how to install the Facebook Pixel Helper.
Using Pixel Helper, you can confirm if a Facebook pixel has been added to your website, what standard events are on which pages (e.g. Event ID: ViewContent) and which content_ids are being reported by clicking View Event Log.
Common issues uncovered while testing your pixel
- Matching your catalogue to your Facebook pixel: If you receive an error stating that the pixel couldn't find a catalogue, you will need to fix your event sources in the catalogue settings. Associating your pixel or app tells Facebook which pixel or app will match which catalogue. To associate your pixel, navigate to the Settings page in Business Manager, click Product Catalogues, select your catalogue and click Associate Sources. Select the pixel or app that you would like to map to this catalogue. If a different team member created the catalogue and then placed the Facebook pixel, you may need to grant admin access (required) to add/update a catalogue's settings.
- Matching IDs used in feeds and pixels or SDK: If you receive errors stating that products didn't match, it is likely that the product IDs being sent via the pixel for content_ids didn't match products in your catalogue. The content ID reported from the Facebook pixel must be exactly the same as the corresponding ID column from the catalogue.
- Associate your pixel with your catalogue: If you've set up your dynamic ad for automotive and there is no spend going through, double-check that you've associated an event source group (the pixel) with your catalogue.
- To do this:
- In the assets menu, click on Product catalogues. Select your catalogue.
- Click on Catalogue settings in the top menu.
- At event sources, click on Edit.
- Assign pixels and apps to your catalogue.
Implement the Facebook SDK for your mobile app
You need a Facebook app ID to use the Facebook SDK for iOS, Android or JavaScript (web). You can use an existing app if you already have one. If you do not have an existing app, use our Quick start to create a new one. If you need help, follow our guide on how to register and configure an app.
You will need to add the SDK to your app. Learn more in our getting started guide.
Prior to adding the SDK to your app, read the section below to also integrate the required app events for dynamic ads.
To dynamically retarget your app users with relevant products, the same four required events must be added to your app.
Event | App event |
---|---|
Search | fb_mobile_search |
ViewContent | fb_mobile_content_view |
InitiateCheckout | fb_mobile_initiated_checkout |
Purchase | fb_mobile_purchase |
For more details on adding these four custom data events, visit our developer site.
To ensure that your app events are being sent correctly, you can check your recent events in Facebook Analytics for Apps.
After you've added your pixel and events, you need to associate an event source group (the pixel) with your catalogue. If your setup includes multiple catalogues and pixels, make sure that you properly connect the right pieces together. You can match the pixels with the corresponding vehicle catalogue through Facebook Business Manager:
- In the assets menu, click on Catalogues.
- Select your catalogue.
- Click on Catalogue settings in the top menu.
- At event sources, click on Edit.
- Assign pixels and apps to your catalogue.
Note: If you are a developer, visit Facebook for Developers for more information on associating your pixel with your catalogue via Business Manager or the API.
Complete your dynamic ad for automotive:
* Nguồn: Facebook