Skip to main content

Hello,

I’m starting to learn APIs. I’d like to trigger an API call from PostMan.

I am using the Post - Create Client Event

Code looks like the below:

 

{

    "data": {

        "type": "event",

        "attributes": {

            "properties":

                { "browser":"firefox",

                    "os":"Windows",

                    "page":"http://www.example.com/landing"},

            "metric": {

                "data": {

                    "type": "metric",

                    "attributes": {

                        "name":"Active on Site"

 

But when I run the code it puts a 2nd metric in my klaviyo account with the same name, so I then have 2 metrics with the same name - Active on Site. Why is this?

How can I trigger the Active on Site metric that is in Klaviyo?

 

Dilan

Hey @dilanx 

Enabling onsite tracking is different for each ecommerce integration.

You do not need to add Klaviyo.js separately if you enabled active onsite tracking through one of the ecommerce integrations below:

  • Shopify
    Active on Site tracking is added automatically through the integration or through the Klaviyo app embed if it's toggled on.
  • BigCommerce
    Active on Site tracking is added when you integrate if you also check the setting Automatically add Klaviyo onsite JavaScript in Klaviyo.
  • WooCommerce
    Active on Site tracking is added automatically when you integrate.
  • Magento
    Active on Site tracking is added automatically when you integrate.
  • Wix 
    Active on Site tracking is added when you integrate if you also check the setting Automatically add Klaviyo onsite JavaScript in Klaviyo.

If you are using another ecommerce platform, or a custom platform, you can install Klaviyo.js manually.

more information on this here

I hope this helps

Cheers

Arpit Banjara


I'm trying to trigger a flow without having a store.

Is it possible for me to trigger the flow for Active on Site, using just an API call? 

Basically I want to test my flows without having to actually trigger them as a customer.


Reply