Meta Ads Setup
Connect Meta (Facebook + Instagram) ad accounts via BYO OAuth.
The Meta Ads Manager layer (template ID
9b38d03f-9f35-43bc-a823-2ffe603601dd) drives Facebook and Instagram
campaigns. You connect your own (BYO) Meta ad account via OAuth.
Connect via OAuth
- Install the layer from the catalog.
- Click Connect via OAuth. Meta dialog opens.
- Sign in with the user that admins the ad account.
- Grant scopes:
ads_management,ads_read,business_management,pages_show_list,pages_read_engagement. - Pick the ad account.
- Provide:
- Pixel ID - the Meta Pixel that receives conversions.
- CAPI access token - generate from Meta Events Manager → your Pixel → Settings → Conversions API → Generate access token.
- Layers stores the token in the
Layers credential vault and shows you the
vault_idreference. - Verify by sending a test event.
Layer config
Once set up, the layer config has:
{
"metaBusinessId": "...",
"adAccountId": "act_...",
"pageId": "...",
"instagramAccountId": "...",
"capi": {
"enabled": true,
"pixel_id": "1234567890",
"access_token_vault_id": "vault_abc"
},
"objectives": ["app_installs", "purchases"],
"geos": ["US", "CA", "UK"],
"monthlyCostCap": 50000
}CAPI requirements summary
is_active = trueis_deleted = falsecapi.enabled = truepixel_idsetaccess_token_vault_idresolvable
If any of these is false, CAPI relay silently no-ops. Layers surfaces this on the layer's overview tab.
Multi-pixel setups
For brands with separate Pixels per app or geo:
- Install one Meta Ads layer per Pixel.
- Each layer has its own CAPI config and ad account.
- Dashboards roll up across all installed layers.
Verification checklist
- Layers can list your campaigns.
- CAPI test event appears in Events Manager → Test Events.
- Pixel ID matches the one on your website / app.
- The ad account's billing method is funded.
- Optimizer is enabled.
Troubleshooting
- "Token decryption failed" - vault_id rotated; regenerate CAPI token and re-paste.
- Events not arriving in Test Events - make sure the SDK is
configured to forward to
in.layers.com, not direct to Meta.