What It Covers
Template analytics helps measure how each template performs over time. Typical metrics include:
- Sent — total messages sent
- Delivered — confirmed deliveries
- Read — confirmed read receipts
- Clicked — URL and quick-reply button clicks (marketing and utility templates)
- Cost — amount spent, and cost per delivery or per URL button click
Data is daily, with a lookback of up to 90 days, for up to 10 template_ids per request. start and end take a UNIX timestamp or a YYYY-MM-DD date; a timestamp that isn't midnight UTC moves back to 00:00 UTC that day. Days are in UTC unless you pass use_waba_timezone=true, which uses the WABA's configured timezone, requires YYYY-MM-DD dates, and adds waba_timezone to the response.
Only Cloud API sends are counted by default. Pass product_type=MARKETING_MESSAGES_LITE_API for sends through the Marketing Messages API for WhatsApp. Businesses onboarded to that API can also request app and website conversion metrics such as WEBSITE_PURCHASES and APP_ACTIVATIONS (see Conversion Tracking).
Enable Template Analytics
Template analytics must be confirmed on the WABA before Meta returns any data, in WhatsApp Manager or with:
POST /<WABA_ID>?is_enabled_for_insights=true
The response is the WABA ID, and Meta starts capturing analytics from then on. Once confirmed, template analytics can't be turned off. Confirming also turns on link tracking for website clicks, which you can switch off per template (see CTA Link Tracking), and lets Meta collect and anonymize chat data to improve its services. The WABA's is_enabled_for_insights field shows the current state.
Limitations
- Button click metrics are only available for
MARKETINGandUTILITYtemplates. - WABAs owned by or shared with a business portfolio in the European Union or Japan, or with a business phone number from one of those countries, are not supported.
- Read and click counts are only recorded for 7 days after a message is sent. After that they reset to zero and stop updating.
COSTis not returned for a WABA that shares a Solution Partner's credit line.
Example Query
curl -g 'https://graph.facebook.com/<GRAPH_VERSION>/<WABA_ID>/template_analytics?start=1718064000&end=1718150400&granularity=daily&metric_types=sent,delivered,read,clicked,cost&template_ids=[1421988012088524,2632273056924580]' \
-H 'Authorization: Bearer <CUSTOMER_OWNED_META_TOKEN>'
granularity must be daily. Leave out metric_types to get every metric.
Example Response
{
"data": [
{
"granularity": "DAILY",
"product_type": "cloud_api",
"data_points": [
{
"template_id": "2632273056924580",
"start": 1718064000,
"end": 1718150400,
"sent": 1240,
"delivered": 1220,
"read": 980,
"clicked": [
{ "type": "quick_reply_button", "button_content": "Contact Support", "count": 112 },
{ "type": "url_button", "button_content": "Tell me more", "count": 80 },
{ "type": "unique_url_button", "button_content": "Tell me more", "count": 64 }
],
"cost": [
{ "type": "amount_spent", "value": 30.5 },
{ "type": "cost_per_delivered", "value": 0.025 },
{ "type": "cost_per_url_button_click", "value": 0.38 }
]
}
]
}
],
"paging": { "cursors": { "before": "MAZDZD", "after": "MjQZD" } }
}
Cost and Click Metrics
cost is an array of type and value pairs:
amount_spent— total spent as a result of sending the template in the time range.cost_per_delivered—amount_spentdivided by deliveries in the time range.cost_per_url_button_click—amount_spentdivided by URL button clicks; quick-reply clicks don't count. Left out when the template has no URL button.
clicked is an array of type, button_content, and count. url_button counts all clicks on a URL button, unique_url_button counts the distinct WhatsApp accounts that clicked it, and Meta's examples also return quick_reply_button.
CTA Link Tracking
Button click tracking is on for every new template (cta_url_link_tracking_opted_out: false). To turn it off for one template, set the field to true and pass the template's current category:
curl -X POST 'https://graph.facebook.com/<GRAPH_VERSION>/<TEMPLATE_ID>?cta_url_link_tracking_opted_out=true&category=marketing' \
-H 'Authorization: Bearer <CUSTOMER_OWNED_META_TOKEN>'
Template analytics then stop returning clicked for that template, and WhatsApp Manager stops showing its button clicks. Passing a category other than the current one sends the template back to PENDING for review.
Template Group Analytics
template_group_analytics returns the same daily sent, delivered, read, clicked, and cost metrics for template groups, with up to 10 template_group_ids instead of template_ids. Data points carry template_group_id. The 90-day lookback, use_waba_timezone, enablement, and limitations above apply too.
curl -g 'https://graph.facebook.com/<GRAPH_VERSION>/<WABA_ID>/template_group_analytics?granularity=daily&start=1738465116&end=1739559516&metric_types=sent,delivered,read&template_group_ids=[1044106240855852]' \
-H 'Authorization: Bearer <CUSTOMER_OWNED_META_TOKEN>'
Template Comparison
Meta's comparison endpoint compares two templates on block rate, send count, and top block reason:
GET /<TEMPLATE_ID>/compare?template_ids=[<OTHER_TEMPLATE_ID>]&start=<UNIX_START>&end=<UNIX_END>
- Only two templates at a time, both in the same WABA.
- Each must have been sent at least 1,000 times in the window.
- The window must be 7, 30, 60, or 90 days ending at the time of the request.
- It needs a user or system user token with
whatsapp_business_management.
The response has three metrics: BLOCK_RATE lists the template IDs from lowest to highest ratio of blocks to sends, MESSAGE_SENDS gives each template's send count, and TOP_BLOCK_REASON gives each template's most common block reason: NO_LONGER_NEEDED, NO_REASON, NO_REASON_GIVEN, NO_SIGN_UP, OFFENSIVE_MESSAGES, OTHER, OTP_DID_NOT_REQUEST, SPAM, or UNKNOWN_BLOCK_REASON.
Dualhook Boundary
Dualhook does not collect or display template analytics. The Runtime API has no template_analytics, template_group_analytics, or compare route, and it can read the WABA's is_enabled_for_insights but not change it. It does accept cta_url_link_tracking_opted_out, together with category (upper or lower case, sent to Meta in upper case), in the JSON body of a template create or update; the dashboard template editor doesn't set it. Confirm analytics and view template insights in WhatsApp Manager, or call these endpoints from your own Meta app.
For template structure details, see Template Elements.