Solved

Creating metrics using API

  • 18 June 2021
  • 6 replies
  • 3983 views

Badge +2

Hi I want to create metrics using the API . The API only have endpoints to get the metrics details.
Is there any particular way by which I can create new metrics using API.
Looking forward for some help.
Thanks

icon

Best answer by julie.accardo 19 June 2021, 15:47

View original

6 replies

Userlevel 5
Badge +34

Hi @akash14,

 

Thanks for writing into the Community!

 

Our Track API allows you to send custom events/metrics based on a users’s action on your website to Klaviyo. If you’ve already reviewed our API documentation and have a specific use case that you’re looking to crowdsource with the Klaviyo community, feel free to share that!

 

Best,

Julie

You can also use our new Events endpoint to create and record custom events as well. This endpoint is most appropriate for triggering server-side events. 

 

Hey @David To 

 

Thanks for the speedy response. Yes after much searching in the documentation we also came to the conclusion that we want to send an Event API request with a new custom metric so that we can then trigger a flow based on that metric.

 

 

Userlevel 7
Badge +60

Hello @akash14,

Echoing @julie.accardo, the endpoint you’ll want to use to build your own custom metrics would be Klaviyo’s Track API endpoint. 

Utilizing this API would allow you to build out your own custom events/metrics which can then be synced and recorded to a Klaviyo profile. 

I would recommend taking a look at the following resources Klaviyo offers on the subject below:

Alternatively, if you were looking for further assistance in creating and building these APIs, I would recommend reaching out and working with a developer you are familiar with or finding a Klaviyo partner from our extensive network of partners.

I hope this helps!

David

Looks like the Track API is deprecated. What is the new way of doing this?

Userlevel 7
Badge +60

Hey @yanniboi,

Great call out! 

Though, I wouldn’t say the method of  trigger custom events/metrics based on a users’s action on your website - formerly know as the track API has been depreciated. Rather, it’s been expanded upon as simply the track method and our events API. 

The original method of our track API still remains where you’re able to track activity on your website. You can read up more on this from our Developer Portal - specifically our JavaScript API for identification and tracking and Custom metric tracking with JavaScript guides. 

You can also use our new Events endpoint to create and record custom events as well. This endpoint is most appropriate for triggering server-side events. 

David

Badge +2

Thanks for your response but I am looking for an endpoint for creating metrics using API.
If you could provide me that specific endpoint then it would we helpful.
Thanks

Reply