[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs-en-\u002Fen\u002Fdocs\u002Fplatform-guides\u002Fmeta-capi":3},{"id":4,"title":5,"body":6,"category":826,"code_examples":827,"demos":827,"description":828,"extension":829,"meta":830,"navigation":827,"order":816,"path":831,"seo":832,"sitemap":842,"stem":844,"tags":845,"toc":852,"videos":827,"__hash__":853},"docsEn\u002Fen\u002Fdocs\u002Fplatform-guides\u002Fmeta-capi.md","Setup Meta Conversions API (CAPI)",{"type":7,"value":8,"toc":805},"minimark",[9,14,18,23,26,55,66,70,73,92,96,112,117,127,134,150,261,265,306,310,355,359,366,371,378,389,397,401,440,459,463,483,487,498,505,528,531,536,551,569,582,617,621,624,687,708,712,715,725,731,735,739,742,750,755,784,787,791],[10,11,13],"h1",{"id":12},"meta-conversions-api-capi","Meta Conversions API (CAPI)",[15,16,17],"p",{},"Meta Conversions API (CAPI) is an essential tool for modern advertisers. This feature allows you to send conversion data (like Leads, Purchases) directly from the Konektor server to Meta, bypassing the user's browser.",[19,20,22],"h2",{"id":21},"why-you-must-use-capi","Why You Must Use CAPI?",[15,24,25],{},"Regular browser Pixel is becoming increasingly inaccurate due to:",[27,28,29,37,43,49],"ol",{},[30,31,32,36],"li",{},[33,34,35],"strong",{},"Ad Blockers",": Extensions like uBlock Origin block pixels.",[30,38,39,42],{},[33,40,41],{},"Browser Privacy",": Safari (ITP) and Firefox limit cookie lifespan.",[30,44,45,48],{},[33,46,47],{},"Unstable Connections",": Slow page loading can fail to trigger the pixel.",[30,50,51,54],{},[33,52,53],{},"iOS14+",": Tracking Transparency (ATT) makes app\u002Fweb tracking difficult.",[15,56,57,58,61,62,65],{},"With CAPI, data is sent ",[33,59,60],{},"Server-to-Server",", making it more resilient to the above issues. Data accuracy can increase by ",[33,63,64],{},"10-30%",".",[19,67,69],{"id":68},"setup-requirements","Setup Requirements",[15,71,72],{},"Before starting, ensure you have:",[74,75,76,82,89],"ul",{},[30,77,78,79,65],{},"Admin access to ",[33,80,81],{},"Meta Business Manager",[30,83,84,85,88],{},"A ",[33,86,87],{},"Meta Pixel"," already created.",[30,90,91],{},"Admin access to Konektor Dashboard.",[19,93,95],{"id":94},"url-parameters-template-meta-ads","URL Parameters Template (Meta Ads)",[15,97,98,99,103,104,107,108,111],{},"Meta supports auto-tagging for IDs like ",[100,101,102],"code",{},"campaign_id",", ",[100,105,106],{},"adset_id",", and ",[100,109,110],{},"ad_id",". Add name snapshots for stable historical reporting and use official macros from Ads Manager.",[15,113,114],{},[33,115,116],{},"Recommended Template (UTM + Stable IDs):",[118,119,124],"pre",{"className":120,"code":122,"language":123},[121],"language-text","utm_source=meta&utm_medium=paid&utm_campaign={{campaign.name}}&utm_term={{adset.name}}&utm_content={{ad.name}}&campaign_id={{campaign.id}}&adset_id={{adset.id}}&ad_id={{ad.id}}&campaign_name={{campaign.name}}&adset_name={{adset.name}}&ad_name={{ad.name}}&site_source_name={{site_source_name}}&ad_meta={{placement}}&ad_account_id=YOUR_AD_ACCOUNT_ID\n","text",[100,125,122],{"__ignoreMap":126},"",[15,128,129,130,133],{},"Fill ",[100,131,132],{},"ad_account_id"," with your ad account ID.",[135,136,138],"info",{"title":137},"Important Note",[15,139,140,141,145,146,149],{},"If you fill the ",[142,143,144],"em",{},"URL Parameters"," field in Meta Ads, ",[33,147,148],{},"do not add the question mark (?)",". Meta will append it automatically.",[151,152,153,154],"details",{},"View Meta Dynamic Macros\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",[155,156,157,173],"table",{},[158,159,160],"thead",{},[161,162,163,167,170],"tr",{},[164,165,166],"th",{},"Macro",[164,168,169],{},"Description",[164,171,172],{},"Example",[174,175,176,192,207,222,237],"tbody",{},[161,177,178,184,187],{},[179,180,181],"td",{},[100,182,183],{},"{{campaign.name}}",[179,185,186],{},"Campaign Name",[179,188,189],{},[100,190,191],{},"Eid_Promo",[161,193,194,199,202],{},[179,195,196],{},[100,197,198],{},"{{adset.name}}",[179,200,201],{},"Ad Set Name",[179,203,204],{},[100,205,206],{},"Java_Bali_25-50",[161,208,209,214,217],{},[179,210,211],{},[100,212,213],{},"{{ad.name}}",[179,215,216],{},"Ad Name",[179,218,219],{},[100,220,221],{},"Testimonial_Video_1",[161,223,224,229,232],{},[179,225,226],{},[100,227,228],{},"{{placement}}",[179,230,231],{},"Placement",[179,233,234],{},[100,235,236],{},"Instagram_Stories",[161,238,239,244,247],{},[179,240,241],{},[100,242,243],{},"{{site_source_name}}",[179,245,246],{},"Source Platform",[179,248,249,103,252,103,255,103,258],{},[100,250,251],{},"fb",[100,253,254],{},"ig",[100,256,257],{},"an",[100,259,260],{},"msg",[19,262,264],{"id":263},"how-to-get-capi-token","How to Get CAPI Token",[27,266,267,277,280,287,294,300],{},[30,268,269,270,65],{},"Open ",[271,272,276],"a",{"href":273,"rel":274},"https:\u002F\u002Fbusiness.facebook.com\u002Fevents_manager",[275],"nofollow","Meta Events Manager",[30,278,279],{},"Select the Pixel you want to use.",[30,281,282,283,286],{},"Go to the ",[33,284,285],{},"Settings"," tab.",[30,288,289,290,293],{},"Scroll down to the ",[33,291,292],{},"Conversions API"," section.",[30,295,296,297,65],{},"Click ",[33,298,299],{},"Generate Access Token",[30,301,302,305],{},[33,303,304],{},"IMPORTANT",": Copy and save this token in a safe place (Notepad\u002FPassword Manager). Meta will not display this token again.",[19,307,309],{"id":308},"integration-in-konektor","Integration in Konektor",[27,311,312,315,321,327,333,344,350],{},[30,313,314],{},"Login to Konektor Dashboard.",[30,316,317,318,65],{},"Go to ",[33,319,320],{},"Settings > Pixel & Tracking",[30,322,323,324,65],{},"Select ",[33,325,326],{},"Meta \u002F Facebook",[30,328,329,330,65],{},"Enter your ",[33,331,332],{},"Pixel ID",[30,334,335,336,339,340,343],{},"Paste the ",[33,337,338],{},"Access Token"," you copied into the ",[142,341,342],{},"CAPI Access Token"," field.",[30,345,296,346,349],{},[33,347,348],{},"Test Connection"," to ensure successful connection.",[30,351,296,352,65],{},[33,353,354],{},"Save",[19,356,358],{"id":357},"setup-for-click-to-whatsapp-ctwa-ads","Setup for Click-to-WhatsApp (CTWA) Ads",[15,360,361,362,365],{},"If you run ",[33,363,364],{},"Click-to-WhatsApp"," ads on Meta, additional configuration is required so that conversions from WhatsApp conversations can be attributed back to your ads.",[367,368,370],"h3",{"id":369},"why-is-additional-configuration-needed","Why Is Additional Configuration Needed?",[15,372,373,374,377],{},"When a user clicks a CTWA ad and enters WhatsApp, Meta sends a ",[100,375,376],{},"ctwa_clid"," (Click-to-WhatsApp Click ID) via webhook. Konektor automatically captures this ID from partner integrations (Qiscus, Qontak, etc.).",[15,379,380,381,384,385,388],{},"However, when sending conversion events back to Meta via CAPI, Meta ",[33,382,383],{},"requires"," the ",[100,386,387],{},"whatsapp_business_account_id"," field in the payload. Without this field, events will be rejected with the error:",[390,391,392],"blockquote",{},[15,393,394],{},[142,395,396],{},"Missing Page ID Or WhatsApp Business account ID",[367,398,400],{"id":399},"how-to-get-your-whatsapp-business-account-id","How to Get Your WhatsApp Business Account ID",[27,402,403,410,416,426,429],{},[30,404,269,405,65],{},[271,406,409],{"href":407,"rel":408},"https:\u002F\u002Fbusiness.facebook.com\u002Fsettings",[275],"Meta Business Suite",[30,411,412,413,65],{},"In the left sidebar, click ",[33,414,415],{},"Business Settings",[30,417,418,419,422,423,65],{},"Navigate to ",[33,420,421],{},"Accounts"," > ",[33,424,425],{},"WhatsApp Accounts",[30,427,428],{},"Select the WhatsApp Business account connected to your ads.",[30,430,431,432,435,436,439],{},"Copy the ",[33,433,434],{},"numeric ID"," displayed (e.g. ",[100,437,438],{},"123456789012345",").",[441,442,444],"tip",{"title":443},"Alternative",[15,445,446,447,452,453,422,456,458],{},"You can also find the WABA ID in ",[271,448,451],{"href":449,"rel":450},"https:\u002F\u002Fbusiness.facebook.com\u002Fwa\u002Fmanage\u002F",[275],"WhatsApp Manager"," under ",[33,454,455],{},"Phone Numbers",[33,457,285],{},". The ID is shown in the URL or on the account detail page.",[367,460,462],{"id":461},"entering-the-id-in-konektor","Entering the ID in Konektor",[27,464,465,469,472,479],{},[30,466,317,467,65],{},[33,468,320],{},[30,470,471],{},"Edit your Meta pixel.",[30,473,474,475,478],{},"Fill in the ",[33,476,477],{},"WhatsApp Business Account ID"," field with the copied ID.",[30,480,296,481,65],{},[33,482,354],{},[367,484,486],{"id":485},"multiple-waba-ids-multi-number","Multiple WABA IDs (Multi-Number)",[15,488,489,490,493,494,497],{},"If your business uses ",[33,491,492],{},"multiple WhatsApp numbers"," registered under ",[33,495,496],{},"different WhatsApp Business accounts"," (different WABA IDs), the WABA ID set in the Pixel only serves as a default fallback.",[15,499,500,501,504],{},"To ensure CTWA conversions are sent to the correct Meta account based on the agent number handling the lead, you need to set a WABA ID ",[33,502,503],{},"per session",":",[27,506,507,512,519,524],{},[30,508,317,509,65],{},[33,510,511],{},"WhatsApp > Sessions",[30,513,514,515,518],{},"Click the ",[33,516,517],{},"Edit"," button on the session you want to configure.",[30,520,474,521,523],{},[33,522,477],{}," field with the appropriate WABA ID for that number.",[30,525,296,526,65],{},[33,527,354],{},[15,529,530],{},"Konektor will automatically match the agent number on the lead with the registered session, then send the conversion using the WABA ID from that session.",[15,532,533],{},[33,534,535],{},"WABA ID resolution priority:",[27,537,538,545],{},[30,539,540,541,544],{},"WABA ID from the ",[33,542,543],{},"session"," matching the agent number on the lead.",[30,546,540,547,550],{},[33,548,549],{},"Pixel configuration"," (fallback).",[441,552,554],{"title":553},"When do you need per-session setup?",[74,555,556,563],{},[30,557,558,559,562],{},"You have ",[33,560,561],{},"one WABA ID"," for all numbers → just set it in the Pixel.",[30,564,558,565,568],{},[33,566,567],{},"multiple WABA IDs"," (e.g., sales numbers on WABA A, support numbers on WABA B) → set the WABA ID on each session, and optionally set one in the Pixel as a fallback.",[135,570,572],{"title":571},"This field is optional",[15,573,574,575,578,579,581],{},"If you are ",[33,576,577],{},"not"," running Click-to-WhatsApp ads, you can ignore this field. It is only used when Konektor detects a lead that came through a CTWA ad click (has a ",[100,580,376],{},"). For leads from other sources (website, form, manual), this field has no effect.",[135,583,585,591],{"title":584},"Sync log statuses",[15,586,587,588,504],{},"When Konektor sends events to Meta, it records detailed results in ",[33,589,590],{},"Sync Logs",[74,592,593,599,605,611],{},[30,594,595,598],{},[100,596,597],{},"accepted",": Meta accepted the payload.",[30,600,601,604],{},[100,602,603],{},"partial_failure",": the request reached Meta, but some data was rejected or needs review.",[30,606,607,610],{},[100,608,609],{},"failed",": the request failed before Meta accepted it.",[30,612,613,616],{},[100,614,615],{},"skipped",": Konektor did not send the event because the minimum data or configuration was not available.",[19,618,620],{"id":619},"what-data-is-sent","What Data is Sent?",[15,622,623],{},"Konektor automatically sends the following standard events based on lead status:",[155,625,626,637],{},[158,627,628],{},[161,629,630,634],{},[164,631,633],{"align":632},"left","Lead Status",[164,635,636],{"align":632},"Meta Event",[174,638,639,651,663,675],{},[161,640,641,646],{},[179,642,643],{"align":632},[100,644,645],{},"new",[179,647,648],{"align":632},[100,649,650],{},"Lead",[161,652,653,658],{},[179,654,655],{"align":632},[100,656,657],{},"qualified",[179,659,660],{"align":632},[100,661,662],{},"InitiateCheckout",[161,664,665,670],{},[179,666,667],{"align":632},[100,668,669],{},"won",[179,671,672],{"align":632},[100,673,674],{},"Purchase",[161,676,677,682],{},[179,678,679],{"align":632},[100,680,681],{},"resubscribed",[179,683,684],{"align":632},[100,685,686],{},"Subscribe",[688,689,691],"warning",{"title":690},"Matching Quality",[15,692,693,694,696,697,700,701,704,705,439],{},"For CAPI events to match with Facebook users, we send hashed (SHA256) user data such as Email (",[100,695,142],{},"), Phone (",[100,698,699],{},"ph","), First Name (",[100,702,703],{},"fn","), and City (",[100,706,707],{},"ct",[19,709,711],{"id":710},"event-deduplication","Event Deduplication",[15,713,714],{},"If you have both Browser Pixel and CAPI installed, Meta may receive 2 events for the same occurrence (Double Counting).",[15,716,717,718,721,722,724],{},"Konektor sends a unique ",[100,719,720],{},"event_id"," for server-side events. Browser and server deduplication only works when your browser-side event also sends the same ",[100,723,720],{},". If the browser event uses a different ID, Meta will treat them as separate events.",[15,726,727,728,730],{},"For Click-to-WhatsApp flows, ",[100,729,376],{}," is treated as webhook-derived data from WhatsApp \u002F ad metadata, not as a normal browser-tracked parameter.",[19,732,734],{"id":733},"troubleshooting","Troubleshooting",[367,736,738],{"id":737},"events-not-showing-up-check-traffic-permissions","Events Not Showing Up? Check Traffic Permissions",[15,740,741],{},"The most common issue is blocked events because the domain hasn't been added to Meta's Allow List. You might see a warning like:",[390,743,744],{},[15,745,746,747],{},"If an error has been detected in the last 3 days it will appear here...\n",[33,748,749],{},"Domain(s) recently started sending data. Confirm that they're yours by adding them to allowlist.",[15,751,752],{},[33,753,754],{},"Solution:",[27,756,757,762,767,773,779],{},[30,758,269,759,761],{},[33,760,285],{}," in Meta Events Manager.",[30,763,289,764,293],{},[33,765,766],{},"Traffic Permissions",[30,768,769,770,293],{},"Check the ",[33,771,772],{},"Allow List",[30,774,775,776,65],{},"Select your domain, then click ",[33,777,778],{},"Add to Allow List",[30,780,296,781,65],{},[33,782,783],{},"Confirm",[15,785,786],{},"Once your domain is whitelisted, events will start flowing normally.",[19,788,790],{"id":789},"next-steps","Next Steps",[74,792,793,799],{},[30,794,795],{},[271,796,798],{"href":797},"\u002Fen\u002Fdocs\u002Fplatform-guides\u002Fmeta-emq","EMQ Score Optimization",[30,800,801],{},[271,802,804],{"href":803},"\u002Fen\u002Fdocs\u002Fplatform-guides\u002Fcustomer-journey","View Customer Journey",{"title":126,"searchDepth":806,"depth":806,"links":807},2,[808,809,810,811,812,813,820,821,822,825],{"id":21,"depth":806,"text":22},{"id":68,"depth":806,"text":69},{"id":94,"depth":806,"text":95},{"id":263,"depth":806,"text":264},{"id":308,"depth":806,"text":309},{"id":357,"depth":806,"text":358,"children":814},[815,817,818,819],{"id":369,"depth":816,"text":370},3,{"id":399,"depth":816,"text":400},{"id":461,"depth":816,"text":462},{"id":485,"depth":816,"text":486},{"id":619,"depth":806,"text":620},{"id":710,"depth":806,"text":711},{"id":733,"depth":806,"text":734,"children":823},[824],{"id":737,"depth":816,"text":738},{"id":789,"depth":806,"text":790},"platform-guides",null,"Complete guide on how to setup Meta CAPI for server-side tracking, improving data accuracy, and bypassing pixel blockers.","md",{},"\u002Fen\u002Fdocs\u002Fplatform-guides\u002Fmeta-capi",{"title":833,"description":834,"keywords":835,"canonical":831,"image":841},"Meta Conversions API (CAPI) Tutorial - Server-Side Tracking Setup","Easy way to setup Meta Conversions API in Konektor. Increase your Facebook & Instagram ad tracking accuracy by up to 30%.",[836,837,838,839,840],"meta capi","facebook conversions api","how to setup capi","server side tracking","facebook pixel","\u002Fog-meta-capi.png",{"loc":831,"lastmod":843},"2026-03-11","en\u002Fdocs\u002Fplatform-guides\u002Fmeta-capi",[846,847,848,849,850,851],"meta","facebook ads","instagram ads","capi","pixel","server-side",true,"CHXo08qLkvTn1wDaVTcv0dzKL7VBtupkQZYHbyzXGz0"]