Skip to main content
Solved

Calculating unique opens

  • December 12, 2022
  • 1 reply
  • 80 views

Forum|alt.badge.img+3

I’ve been using the endpoint and requesting the “unique” number of opens (weekly unit)

https://a.klaviyo.com/api/v1/metric/OPENED_EMAIL_METRIC_ID/export

However, the sum of this is much larger than what’s displayed within Klaviyo’s reporting interface.

I’m gathering that with each week in the API export, it’s displaying the unique opens occuring each week, rather than unique opens that have occured over all time like the report. Is there a way to output this instead via the API?

Best answer by Dov

Hi @Wei Tan,

Thanks for sharing this question with our community.

You will need to use either the day, week or month parameter in the request:

curl https://a.klaviyo.com/api/v1/metric/OPENED_EMAIL_METRIC_ID/export -G \
    -d api_key=API_KEY \
    -d unit='week' \
    -d measurement='unique' \
    -d where='[["$message","=",'MESSAGE_ID']]'

Thanks for being a community member.

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • December 12, 2022

Hi @Wei Tan,

Thanks for sharing this question with our community.

You will need to use either the day, week or month parameter in the request:

curl https://a.klaviyo.com/api/v1/metric/OPENED_EMAIL_METRIC_ID/export -G \
    -d api_key=API_KEY \
    -d unit='week' \
    -d measurement='unique' \
    -d where='[["$message","=",'MESSAGE_ID']]'

Thanks for being a community member.