See more products: Buy advertising accounts

After obtaining this quality custom audience thanks to Facebook Pixel, you can use it to run Remarketing ads or create Lookalike audiences and leverage them for your advertising campaigns.
Optimizing Ads
Facebook has a fairly intelligent AI machine learning system that can optimize your advertising campaigns to achieve the best results for advertisers. However, for the machine learning system to work effectively, it needs to understand the profile of the customers who truly bring value to you. By integrating Facebook Pixel into your website, it helps Facebook’s machine learning system identify which potential customers click on ads on Facebook to reach your website and proceed to make purchases or conversions. As a result, Facebook’s AI will strive to distribute ads to more potential customers similar to those who have converted on your website.
How to Install Facebook Pixel
To begin obtaining the Facebook Pixel code, you need to access your ad account or Business Manager.
Step 1: Click on the three horizontal lines in the left menu bar and select “Event Manager.”
.png)




Step 6: Click on the “Manually Install Code” button.

Step 7: Click on the “Copy Code” button and then click “Continue.”

Step 8: Proceed to paste the Pixel code you copied in the previous step into your website.
If you know about web coding, open your website’s source code and paste the Facebook Pixel code between the <head>
and </head>
tags.
If you’re not familiar with web coding, you can ask your web designer or the partner who developed your website to help you insert it.
Additionally, there’s another way to install the code yourself by using Google Tag Manager.
Step 9: After you have pasted the Pixel code into your website, click on “Continue.”

At this point, you have successfully set up and added the Pixel code to your website. The next steps will involve setting up events for your website, and you can learn more by reading the introductory sections and guidelines for setting up and installing Facebook events below.
Note:
- For personal ad accounts, you can only create one Pixel code for that account and cannot create additional Pixels.
- For Facebook Business Manager, you can create and manage multiple Pixels.
What is a Facebook Event?
An event is an action that occurs on your website. Standard events are predefined by Facebook and can be used to record conversions, optimize for conversions, and create audiences.
If you think of Facebook Pixel as the main camera monitoring all the people entering and leaving your website, then Facebook events are like specialized cameras observing the important rooms for you, such as the kitchen, hallway, storage room, etc. By installing tracking for important events on your website, you can gain detailed statistics, such as how many people made purchases, added items to their cart, or left their information for consultation on your site. This way, you can determine whether Facebook ads are effective for you, and it also helps Facebook’s AI machine learning system operate more effectively in optimizing your ads.
Benefits of Setting Up Event Tracking
The key to successful advertising is measuring the effectiveness of your campaigns and creating quality customer lists. By installing Facebook conversion events on your website, you can fully leverage the advantages of Facebook advertising and run ads optimized for conversions.
Let’s explore the significant benefits that Facebook events offer:
Track Important Customer Actions on Your Website

Do you want to know the details of how many people made purchases, added items to their cart, or registered for consultations on your website through Facebook ads? If you want to assess the effectiveness of your Facebook Ads campaigns, you need to identify which events are the most important for your website and proceed to install them.
Create Campaigns Focused on Conversions
If you aim to run Facebook ads to generate more conversions for your website—such as increasing purchases, getting quote requests, or event registrations—you need to run advertising campaigns optimized for those conversion events.


Step 2: Paste the URL of the website where you want to add your conversion events and select “Open Website.”


Step 3: Choose an element on the website to create and set up the event.
Here, you will see two options: “Track New Button” and “Track New URL.”
- If you choose “Track New Button”: This is for setting up a specific event that occurs whenever a customer clicks on a particular button.
For example, when a customer clicks the “Add to Cart” button, we call this an “Add to Cart” event, and you would proceed to set up the event as follows:
Step 4.1: Click on the “Track New Button” option.


In this example of adding the “Add to Cart” event, you will select the “Add to Cart” button to tag with the event code.
Step 6.1: Choose the type of event you want to track and add the value of that event (if applicable), such as the value of the product/service.

After that, select the element that contains the value of the item/service and click “Confirm.”
Step 7.1: If you have completed adding the event, click on the “Finish Setup” button.

You have now completed adding events to the buttons for tracking.
- If you choose “Track URL”: This means you are selecting to activate a specific event whenever a customer visits (loads) a specific URL page on your website.
For example, whenever a customer completes a purchase on your website, they are redirected to a thank-you page with a URL like www.example.com/thank-you. This means that every time the URL www.example.com/thank-you is loaded by a customer who has just completed an online purchase, it will be considered a “Purchase” event.
To set up an event for when a specific URL is loaded, you need to do the following:
You need to follow Step 2 from the previous instructions to open the URL page where you want to set up the event.
Next, select the “Track URL” option.



You have now completed adding tracking events to a specific URL.
Method 2: Manually Installing Facebook Event Codes
With this method, you will choose the standard event codes you need to track and then copy and paste them into your website. You can select the activation conditions and customize other parameters of the event if you require more in-depth measurement. This method is recommended if you are knowledgeable about coding, or if you are a website owner for an e-commerce site or a site with many products/services that require batch event installation.
This method also has its advantages and disadvantages:
Advantages:
- Can install events in bulk for multiple pages or components on the website at once
- Allows for the customization of tracking many detailed parameters
Disadvantages:
- Time-consuming to customize and set up
- Requires coding knowledge
Detailed Steps for Manually Installing Event Codes:
Step 1: Identify the types of event actions you need to track and optimize for your ads. Then, copy the event code snippets you need to use.
Tên sự kiện tiêu chuẩn | Mã sự kiện |
---|---|
Add payment information
|
<script>
fbq(‘track’, ‘AddPaymentInfo’); </script> |
Add to cart
|
<script>
fbq(‘track’, ‘AddToCart’); </script> |
Add to favorites list
|
<script>
fbq(‘track’, ‘AddToWishlist’); </script> |
Complete registration
|
<script>
fbq(‘track’, ‘CompleteRegistration’); </script> |
Contact | <script>
fbq(‘track’, ‘Contact’); </script> |
Product customization | <script>
fbq(‘track’, ‘CustomizeProduct’); </script> |
Donation | <script>
fbq(‘track’, ‘Donate’); </script> |
Find location | <script>
fbq(‘track’, ‘FindLocation’); </script> |
Start payment | <script>
fbq(‘track’, ‘InitiateCheckout’); </script> |
Potential customer | <script>
fbq(‘track’, ‘Lead’); </script> |
Purchase | <script>
fbq(‘track’, ‘Purchase’, {value: 0.00, currency: ‘VND’}); </script> |
Schedule | <script>
fbq(‘track’, ‘Schedule’); </script> |
Search | <script>
fbq(‘track’, ‘Search’); </script> |
Start free trial | <script>
fbq(‘track’, ‘StartTrial’, {value: ‘0.00’, currency: ‘VND’, predicted_ltv: ‘0.00’}); </script> |
Submit application | <script>
fbq(‘track’, ‘SubmitApplication’); </script> |
Subscribe | <script>
fbq(‘track’, ‘Subscribe’, {value: ‘0.00’, currency: ‘VND’, predicted_ltv: ‘0.00’}); </script> |
ViewContent | <script>
fbq(‘track’, ‘ViewContent’); </script> |
Note:
- The parameter fields highlighted in red in certain special event codes such as Purchase, Start Free Trial, etc., require you to customize the specific conversion values for each event that is triggered. You can use the same value if the conversion events share the same value or adjust this variable to change (dynamically) for multiple different values.
- If you want to customize additional tracking parameters for the event codes, please refer to the detailed guide on how to customize conversion tracking parameters for Developers on Facebook at: Facebook Developer Guide
Step 2: Proceed to paste the event codes you need and set activation conditions for them on the components of your website, such as attaching them to a specific button or whenever a specific URL page is loaded.
If you are using web platforms like WordPress, Haravan, Sapo, or Shopify, most of these platforms are either integrated with or have convenient plugins to help you easily install these event codes.
If you are using Google Tag Manager, you can easily paste and set the activation conditions for these Facebook event tags on your website. However, this method requires you to have some knowledge of HTML and JavaScript.
If you don’t know any code but want to have in-depth tracking capabilities or your website is a pure code website (PHP, C#), then you should contact your web developer/web design agency for assistance.
Step 3: Use the Facebook Pixel Helper tool to check the event installation.
.png)
After successfully pasting, use the Facebook Pixel Helper tool to check whether your installation is correct and if the conversion events are functioning. If you open the Facebook Pixel Helper add-on and then perform a test action to trigger the events, and you see your events appearing in the Facebook Pixel Helper tool in green (as shown in the image above), then you have successfully installed the event codes for your website.
Link to install the Facebook Pixel Helper add-on for the Google Chrome browser: https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc
DONE! You have completed the installation of the Facebook Pixel and conversion event codes for your website. Wishing you success in your practice and effective campaigns!
If you need the most reputable payment method and advertising account provider, you can message the fanpage buybm365.com-Ads to receive advice from HT Media. In addition, you can follow the articles. Latest articles related to our Digital Marketing.