Skip to main content

Hello, I am utilizing the CampaignValues Reports Endpoint to pull the metrics of our company’s campaigns. The issue I am running into is that for some campaigns, the response is blank. For most of the others, it pulls the campaign metrics just fine but for some specific campaigns, the returned values is blank/null. I can confirm that nothing changes in the API POST other than the date range and the campaignID specified. Here is a sample of the response for one of our campaigns:

 

{

    "data": {

        "type": "campaign-values-report",

        "id": "cbe56d14-3618-4be2-a9e9-f2e270c1fc4c",

        "attributes": {

            "results": ]

        }

    },

    "links": {

        "self": "https://a.klaviyo.com/api/campaign-values-reports/",

        "next": null,

        "prev": null

    }

}

Any ideas on what may be causing this? 

@nutraboltBI - this might be a silly question, but are you perhaps querying the API within the rate limits?

Documented is:

Burst: 1/s
Steady: 2/m
Daily: 225/d

You may want to put some delays to see if that works.  


@retention - I can confirm that the query is within the rate limits as the status is 200 on the query. What’s odd is that one query with campaignID “xxxxxx” returns a full JSON result. But the same query with campaignID “yyyyyyy” (and different timeframe) returns the blank JSON. Is there a particular reason why the metrics I am pulling wouldn’t be available for the “yyyyyyy” campaign? In the campaigns API, it doesn’t seem there is anything different about the tracking of the campaigns.


I am also having this issue:

I am calling the query_campaign_values  ( https://developers.klaviyo.com/en/reference/query_campaign_values )

 

And cycle the results using the campaign ID to identify which campaign I want the values for. This works for all our campaigns except the newest two, as above in nutraboltBI’s post I get a response (not an error) but the attribute results set is empty. All that is changing is the campaign ID, and to clarify I have purposively waited 2 minutes before each new attempt to ensure its not throttling our results ( however this would return an error message to state throttling exceeded limits anyway )

 

Given my request is a blanket case using the same conversion_metric_id all the time , works for all other campaigns but not the newest two has me stumped. Clearly its not my code, my request ID etc is as follows for tracing:

{"data":{"type":"campaign-values-report","id":"5cb2d9d4-1512-48c2-a72b-593b01473989","attributes":{"results":l]}},"links":{"self":"https://a.klaviyo.com/api/campaign-values-reports","next":null,"prev":null}}


It took me 2 and a half hours in live chat and going through removing our integration to shopify and adding it back again to get exactly nowhere forward. After being told that because we use a custom integration we should reach out for support from other developers ..  as a developer was somewhat annoying.

I finally got the live chat staff member to raise the issue further, although we have no email to indicate that happened we have to assume they did. So far the answer to this problem is still not available..


Hello, I am utilizing the CampaignValues Reports Endpoint to pull the metrics of our company’s campaigns. The issue I am running into is that for some campaigns, the response is blank. For most of the others, it pulls the campaign metrics just fine but for some specific campaigns, the returned values is blank/null. I can confirm that nothing changes in the API POST other than the date range and the campaignID specified. Here is a sample of the response for one of our campaigns:

 

{

    "data": {

        "type": "campaign-values-report",

        "id": "cbe56d14-3618-4be2-a9e9-f2e270c1fc4c",

        "attributes": {

            "results": ]

        }

    },

    "links": {

        "self": "https://a.klaviyo.com/api/campaign-values-reports/",

        "next": null,

        "prev": null

    }

}

Any ideas on what may be causing this? 

 

After going through support pushing for an answer I finally have a resolution to this issue

“ My understanding is that:

  • last_12_months refers to the previous 12 months, excluding the current month.
  • last_365_days covers the past 365 days, including the current month.

 

Change your request body time frame from  last_12_months  to   last_365_days and your newest campaigns should appear. Although it doesn’t state this in the API documentation page and frankly makes no sense anyway.. but it works.


Reply