
How to create the Meta Pixel for a website and test if it works
Learn how to create the Meta Pixel for a website, connect the ID to the ad account, and test events without duplicating shots.
You create the Pixel for website in the Meta Event Manager, when connecting a web data source. Then you need to install the Pixel, configure the events that represent the actions of the site and test the arrival of those events in the same source.
The mistake that most complicates this beginning is to mix three things. The Business portfolio manages the assets. The Data Set receives events. A Ads Account You need to have access to the source to use it in the campaigns. You may be looking at the right business and still test the wrong ID.
From Pixel created to the first event
Before you create, find out if the site already measures events
Open the Event Manager in the company’s portfolio and see which sources have site activity. If you already advertise, also check out the source and event selected in the ad set. Write down the ID and who is the owner.
In an agency operation, it is worth asking for access to the company's source before creating another in a different portfolio. This prevents a change of vendor from breaking the continuity of the installation. If the question is whether a second offer needs another Pixel, see the criteria for deciding when to create another source.
1. Create the Web data source
- Open the Event Manager and select the business portfolio responsible for the site.
- Use Connect data and select Web as origin. Follow the option to create the Pixel font. Depending on the interface, you can find the source with the dataset name.
- Give a name that identifies the company and the website or store. Open the created font and copy the ID displayed in the settings.
- Check if the ad account that uses this site has access to the source. Validate the selection in the campaign in which the conversion is measured on the site.
Labels may vary depending on the language and account interface. The source to look for in this process is Web. Meta Pixel Setup Guide
2. Choose an installation path for the browser
Native integration of the platform. If your store already has a verified integration and it sends the events you need, connect the ID there. Open the store documentation and check which actions the integration sends on its own, especially what it calls purchase.
GTM or manual installation. Use the implementation that the team can maintain. Configure Pixel loading as per site consent flow and set event triggers with the team that knows the checkout. When using a tag manager, preview the correct environment and validate it before publishing the version.
If native integration already sends PageView and Purchase by the browser, add the same tags in the GTM tends to repeat shots. Invent the shipping points. A API of Conversions can complement the Pixel, with deduplication when the two origins represent the same action. Deduplication of the Pixel and the API of Conversions
3. Set up the first event with a rule you can prove
On an institutional website, make the first conference with PageView. On a website that receives forms, define Lead from a successful confirmation. If you trigger the event in the click of the button, you will count attempts that failed in validation or submission.
In a store, document when Purchase It must occur. If the business measures paid sales, generating a Pix is a stage of checkout. The sale comes in when the payment is confirmed. If the confirmation only happens on the server, only installing the tag in the browser can leave requests from outside when the person closes the page before paying.
4. Test one action at a time
Select the right font in Test events. Open the website in the test session browser and visit a page. Locate the PageView and check the domain and the schedule. If you have installed form or purchase events, repeat the chosen path in a test environment and check out the corresponding event.
Also take the negative test. Try to submit a form with a mandatory blank field. If it arises Lead, the trigger is too soon. For paid purchases, check what happens to a pending order and what happens after it is confirmed. An integration that measures payment needs to distinguish the two states.
Write down what action you did, schedule, test ID, source, event, connection method, and expected result. This record allows you to compare another test after changing the checkout. How to check the receipt of events in the Meta
Pixel installed, but the event did not appear?
- No website event — check the domain, ID, published configuration, environment and consent conditions.
- It only appears
PageView— check the configuration and trigger of the additional event. Navigation and buying are different actions. - Two browser events for an action — look for manual code, plugin and GTM shooting at the same time.
- The event appears in another source — compare the site ID with the selected one in the Event Manager and in the ad set.
The test is useful when you can repeat the same behavior with a valid action and prove that the invalid action is left out. To organize what to store in your structure and what to send to the media, use the map of first-party data collection and conversion tracking.
Frequently Asked Questions
Where can I find the Pixel ID?
Open the Web font in the Event Manager and check out the ID in the settings. Compare the number with the site integration and the font used in the ad set.
Do I need to install Pixel on every page?
The base code is usually applied to the website where you measure navigation, according to the consent rule. Events such as Lead and Purchase must shoot in the actions they represent, with the rules of the operation.
Can I test a Pixel without running an announcement?
Yeah. Yeah. Yeah. You can confirm that the site sends events to the source before starting a campaign. The test proves the receipt of the signal. Campaign credit depends on interaction with ads and attribution rules.