Get event counts by adding the events=...-param to your request. To get the counts of the events (visit_homepage, popup_replace_show, popup_replace_close), you can run this request:
Regarding error, I tried this JavaScript Code, but this code returns error ,
due to (probably) simple analytics api/url returns error that too may calls in a short period time?
// URL
const eventName = “Ad1”;
const startDate = new Date(“2024-04-26”);
const endDate = new Date(“2024-04-29”);
// 開始日から終了日までの各日の結果を取得して出力
for (let currentDate = new Date(startDate); currentDate <= endDate; currentDate.setDate(currentDate.getDate() + 1)) {
// currentDateの値を固定するために新しい変数にコピー
const requestDate = new Date(currentDate);
const url = https://simpleanalytics.com/publickey1.jp.json?version=5&start=${requestDate.toISOString().split("T")[0]}&end=${requestDate.toISOString().split("T")[0]}&events=${eventName};