I’ve worked out how to create events for a specific Profile using the API. However, I wish to re-create a Shopify Event using the “Checkout started” Metric. My call works fine but it creates a duplicate “Checkout started” Metric instead of referencing the existing Shopify one.
Is it possible to create a Shopify event using the API?
My code is below. I’m using php cURL requests if you’re wondering about the formatting. It’s json encoded before setting the payload for the API call.
$postFields = [
"data" => [
"type" => "event",
"attributes" => [
"properties" => [
"action" => "Checkout started",
"service" => "Shopify"
],
"metric" => [
"data" => [
"type" => "metric",
"attributes" => [
"name" => "Checkout started"
]
]
],
"profile" => [
"data" => [
"type" => "profile",
"id" => "01G2T29KZKM491FQGGXC1HPFP7"
]
],
"time" => "2023-11-10T00:00:00"
]
]
];