Skip to main content
Solved

How to exclude Apple Privacy opens when querying Metric Aggregates using API?

  • December 13, 2022
  • 4 replies
  • 326 views

Forum|alt.badge.img+3

Hi, I am trying to retrieve metric aggregates using the endpoints mentioned in https://developers.klaviyo.com/en/reference/query_metric_aggregates . While getting the data for opened emails, How do I exclude Apple Privacy opens? Is there any filtering option? I am using python.

Best answer by Brian Turcotte

Hi @jayadheer_a and my apologies for not getting back to this thread sooner!

 

Although there isn’t a direct filter for Apple Privacy Opens from this endpoint, a member of our engineering team did come up with a workaround that could help you out:

 

  1. Create a segment of Apple Privacy Opens in Klaviyo:
    • Audience > Lists & Segments > Create new Segment:
      • What somebody has done > Opened Email > at least once overall time, where Apple Privacy Open = True
         
  2. Although you can’t query metric aggregates by segment, you can by list. So then, you can convert the segment in a list:
    • Once it’s created, click on the new “Apple Privacy Opens” segment under Lists & Segments. Then, in the upper right-hand “Manage Segment” menu, click Convert to List.
       
  3. Then make an API call and Query Metric Aggregates by the List that was converted in step B.

 

While this should accomplish your use case, the hitch is that you would have to perform these steps every time you make the call since lists aren’t dynamically updated. 

 

I hope this helps, and thanks again for using the Community!

- Brian

 

 

 

 

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

4 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @jayadheer_a and welcome to the Community!

 

The first point I should mention was also articulated by my colleague Dov in the following Community post:

To clarify, Apple Privacy Open tracking in Klaviyo does not necessarily mean that the open was generated by Apple in an automated fashion versus being opened by a human being. Rather, it means that the opened email event came from the mail app on a device with iOS 15+ installed and with mail privacy protection enabled

 

This is important to note, as excluding all Apple Privacy opens might also exclude unwanted data. As Dov mentioned and detailed in that thread, it is possible to filter out Apple Privacy opens via segmentation within Klaviyo.

 

As far as filtering with the Query Metric Aggregates endpoint, I don’t know of any filter for this use case, but I will reach out to our engineering team ASAP and see if they know of anything that might be able to accomplish this. I’ll update the thread as soon as I hear back.

 

Thanks for using the Community!

- Brian


Forum|alt.badge.img+3
  • Author
  • Contributor III
  • 6 replies
  • December 14, 2022

Hi Brian, 

Thanks for the reply.

Please let me know if there any filtering option with the Query Metric Aggregates endpoint for Apple Privacy opens.

 

Thanks,

Jayadheer A


Forum|alt.badge.img+3
  • Author
  • Contributor III
  • 6 replies
  • December 19, 2022

Hi @Brian Turcotte,

 

Do you have any update on this thing from your engineering team? I really want to know if any such filtering option there.

 

Thanks,

Jayadheer A


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • December 23, 2022

Hi @jayadheer_a and my apologies for not getting back to this thread sooner!

 

Although there isn’t a direct filter for Apple Privacy Opens from this endpoint, a member of our engineering team did come up with a workaround that could help you out:

 

  1. Create a segment of Apple Privacy Opens in Klaviyo:
    • Audience > Lists & Segments > Create new Segment:
      • What somebody has done > Opened Email > at least once overall time, where Apple Privacy Open = True
         
  2. Although you can’t query metric aggregates by segment, you can by list. So then, you can convert the segment in a list:
    • Once it’s created, click on the new “Apple Privacy Opens” segment under Lists & Segments. Then, in the upper right-hand “Manage Segment” menu, click Convert to List.
       
  3. Then make an API call and Query Metric Aggregates by the List that was converted in step B.

 

While this should accomplish your use case, the hitch is that you would have to perform these steps every time you make the call since lists aren’t dynamically updated. 

 

I hope this helps, and thanks again for using the Community!

- Brian