Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Reporting API code examples

This folder is part of the api-examples repository and contains practical code snippets demonstrating common use cases for the Klaviyo Reporting API. Our goal is to provide clear, ready-to-use examples that align with the scenarios outlined in the Reporting API Overview.

What's inside?

Each file within this folder corresponds to a specific use case, making it easy to find and implement the functionality you need. These examples illustrate how to pull reports and analyze behavior of your Klaviyo flows, campaigns, sign-up forms, and segments.

This folder also contains the reporting_apis_youtube folder, which contains the code used in the Analyze marketing performance with reporting APIs YouTube video.

The Python and JavaScript examples use Klaviyo's SDKs:

How to use These examples

  • Browse by use case: Navigate to find the specific reporting scenario you're interested in. Each use case has a corresponding shell script as well as Python and JavaScript examples.
  • Review the code: Each example includes comments to explain the logic and structure of the API call.
  • Adapt to your needs: Copy the relevant code snippet and modify it with your conversion metric IDs, timeframe of interest, flow IDs, etc.
  • Integrate and test: Integrate the code into your application or website and test thoroughly to ensure you are pulling the correct data with the reporting APIs.

Contributing

We welcome contributions! If you have a common use case not yet covered, or an improvement to an existing example, please feel free to open a pull request.