Woopra

Woopra

Analytics

Real-time website analysis tool that targets customer engagement.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Woopra

🚀 Quick Start Examples

Woopra Javascript Examplejavascript
// Woopra API Example
const response = await fetch('https://docs.woopra.com/reference#the-reporting-api', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Exploring Woopra's Reporting API

Are you looking for a way to extract insight from your Woopra data to drive better business decisions? Woopra's Reporting API might just have everything you need. This flexible API exposes a range of data points and metrics that you can use to interrogate your customer behavior and gain valuable insight.

Getting started with Woopra's Reporting API

To get started, you will first need to obtain an API key. This can be done on your Woopra dashboard by navigating to Manage > API > Keys. From here, you can create a new key or use an existing one.

Once you have your API key, it's time to get familiar with the documentation. The Woopra Reporting API documentation can be found at https://docs.woopra.com/reference#the-reporting-api.

Example code in Javascript

Here are some sample codes you can use in Javascript to interact with Woopra's API:

Get a single visitor's details:

fetch('https://www.woopra.com/rest/2.4/reporting/profile', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY_HERE'
    },
    body: JSON.stringify({ 
         'filters': {'operator': 'AND', 'values': [{'property': 'visitor', 'value': 'EMAIL_OR_COOKIE_ID_HERE'}]} 
      })
  })
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error))

Get top referral traffic sources:

fetch('https://www.woopra.com/rest/2.4/reporting/profiles', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY_HERE'
    },
    body: JSON.stringify({ 
         'filters': {'operator': 'AND', 'values': [{'property': 'event_name', 'value': 'pv'}, {'property': 'dimension', 'value': 'referrer'}]}, 
         'grouping': {'operator': 'AND', 'values': [{'type': 'dimension', 'name': 'referrer'}]}, 
         'metrics': [{'type': 'count', 'name': 'pv'}],
         'ordering': [{'type': 'metric', 'name': 'pv', 'sort': 'descending'}], 
         'limit': 10 
      })
  })
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error))

Get daily pageviews:

fetch('https://www.woopra.com/rest/2.4/reporting/profiles', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY_HERE'
    },
    body: JSON.stringify({ 
         'filters': {'operator': 'AND', 'values': [{'property': 'event_name', 'value': 'pv'}]}, 
         'grouping': {'operator': 'AND', 'values': [{'type': 'date', 'name': 'day', 'format': 'YYYY-MM-DD'}, {'type': 'dimension', 'name': 'hostname'}, {'type': 'dimension', 'name': 'path'}]}, 
         'metrics': [{'type': 'count', 'name': 'pv'}],
         'ordering': [{'type': 'date', 'name': 'day', 'sort': 'descending'}], 
         'limit': 10 
      })
  })
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error))

Conclusion

With Woopra's Reporting API, you can easily extract data points and metrics that help you understand your customer behavior better. We hope the example codes above were helpful in getting you started. If you have any questions or need assistance, don't hesitate to reach out to the Woopra team. Happy coding!

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jul 23Jul 25Jul 27Jul 29Jul 31Aug 2Aug 4Aug 6Aug 8Aug 10Aug 12Aug 14Aug 16Aug 18Aug 2104008001440Minutes
Online
Offline

Related APIs in Analytics