All articles

Guides · 5 min read

How to set up a Meta Pixel and connect it with AI agents

Install a Meta Pixel in Events Manager, confirm events reach Meta, then connect that Pixel in AIM. The AI agents use it to see which site actions your ads can optimize for.

By The AIM team at Hekmalabs

The Meta Pixel tells Meta which visits, leads, and purchases happened on your website. AIM's AI agents read those events so they can warn you before a conversion campaign is prepared with nothing to optimize for. Connecting the Pixel does not change your Events Manager setup.

This connection is required for the website leads and website sales goals. A Facebook Page is not a Pixel.

At a glance

  • Time: about 20 minutes for a new Pixel, or 5 minutes if one is already firing.
  • Access you need: a Facebook login that can open the Meta Business that owns the Pixel.
  • What AIM can do: read browser events, server events, match rate, and purchase events.
  • What AIM cannot do: edit events, domains, or your Conversions API setup.

Before you start

  • A website you can edit, or Tag Manager already on the site. See the Tag Manager guide if the Pixel will live there.
  • A Facebook login that can open the Meta Business that owns the Pixel.
  • The Facebook Page connected too, if your ads will run from that Page.
  • In AIM, the Owner, Admin, or Marketer role on the workspace.

Set up the Meta Pixel

  1. Open Meta Events Manager and select the business.
  2. Click Connect data and choose Web. Create a Pixel if you do not have one, and name it after the site.
  3. Install it. The two reliable options are the partner integration for your site platform, or a manual install. If you use Tag Manager, add a Meta Pixel tag with the Pixel ID and publish the container.
  4. Turn on the events you care about. At minimum, PageView should fire on every page. Add Lead or Purchase on the page where that action finishes.
  5. In Events Manager, open Test events. Load your site and complete one action. The event should show as received from the browser. If the tab stays empty, the Pixel is not on the page yet.
  6. Note the Pixel ID, a long number. You will pick the Pixel by name in AIM, and the ID helps if several appear.
  7. Optional, and worth doing for purchases: set up the Conversions API so server events arrive as well. AIM reads both browser and server events. It does not set up the Conversions API for you.

Connect the Meta Pixel with AIM's AI agents

  1. Sign in to AIM and open Integrations, then Meta Pixel.
  2. Click Connect Meta. Facebook asks to see the Businesses and Pixels you manage.
  3. Approve access with the login that can see the right business.
  4. Choose the Pixel for this workspace. A workspace uses one Pixel at a time.
  5. When the badge says Active, the agents can read the last week of browser events, server events, match rate, and purchase events.

What happens after you connect

Here is what AIM does with the connection, in plain terms.

  1. Your access is stored privately. Meta gives AIM an access grant, not your password. AIM keeps it encrypted, uses it only for this workspace, and deletes it from AIM when you disconnect.
  2. Tracking is checked before conversion campaigns. Every campaign an agent prepares goes through a pre-flight check. For conversion campaigns, that check includes whether a Pixel is connected and receiving events. If it is not, the campaign is not sent, and you are told what to fix.
  3. Event health is watched over time. About twice a day, the agents review your results. If events stop arriving, or the match rate drops, the report flags it before anyone recommends more conversion spend.
  4. Nothing is sent to your site. AIM only reads what the Pixel already reports to Meta. It does not add code to your website or change which events fire.
  5. Everything is logged. The Agent work on Meta Pixel list on the integration page records every time an agent read from this Pixel.

Which AI agents use this connection

  • Media Buyer needs the Pixel for conversion ads. Without events, it will not pretend a purchase campaign can optimize.
  • Performance Optimizer checks that events are still arriving before it suggests more spend.
  • Analyst & Reporter reads the events your site sends and includes them in the report.
  • Campaign Planner treats a missing Pixel as a reason to hold conversion spend.

Campaigns still arrive paused. The Pixel does not turn on spend.

If something looks wrong

  • The Pixel is not in the list. The Facebook login you used cannot see the business that owns it. Ask a business admin to add you, then disconnect and connect again.
  • Choose an account. You signed in but have not picked a Pixel yet.
  • Sign in again or Expired. Meta ended the access grant. This often happens after a password change or a security check. Click Connect Meta again.
  • Needs attention. AIM could not read the Pixel. Open the Meta Pixel page in AIM to see the reason.
  • Browser events are zero. The Pixel is not firing on your live site. Recheck Test events (step 5 of the setup).

What stays in your control

Disconnecting in AIM stops the agents from reading the Pixel and removes AIM's access grant. The Pixel keeps firing on your site. To revoke access on Facebook's side too, remove AIM under Facebook Settings, then Business Integrations.

Still need help setting this up?

If Test events stays empty, or the Pixel is not in the list, contact the AIM team. Say you are connecting a Meta Pixel and include the Pixel ID. We will help you finish the setup.

Share LinkedIn X

Start aiming

Put ten marketers on it by tonight.

Create an account, drop in your website, and watch the agents build your first plan. No card to start.

  • No card to start
  • Paused until you approve spend
  • Cancel anytime