I’m currently looping through days and grabbing the number of opens by flow for each day. Below is my JSON:
'data': {
"type": "metric-aggregate",
"attributes": {
"metric_id": ID,
"measurements": [count],
"interval": "day",
"page_size": 500,
"by": ["$flow"],
"filter": f"and(greater-or-equal(datetime,{dt}T00:00-00:00),less-than(datetime,{dt}T23:59:59-00:00))",
"timezone": "UTC"
},
},
}
This is fine, but I realized it doesn’t match the “Unique Opens” metric in the console. How could I alter my logic above to get unique opens (or rather the first open for a given mailing)? If I were to change measurements to “Unique” would I run into issues where an open could occur in different days and thus count on both days despite being the same mailer?