Labels API

Important: Read the intro before proceeding.

Overview

Labels are a way of saving customer segments that are important to you. For example, you may want to save your “rock star” customer segment or your “at-risk of leaving” customer segment in order to monitor, analyze, and compare these customers.

Once you create a Label, you will be able to use it for quick segmentation in many other Woopra features, such as Analytics Reports and the People View. You will also see your Labels on your dashboard.

JSON format

{
        "name": "Purchased (US)",
        "color": "#0844a4",
        "filterObject": [{
        "are": {
                "operator": "AND",
                "filters": []
         },
         "did": {
            "operator": "AND",
            "filters": [{
                   "aggregation": {
                        "value": 1,
                        "method": "count",
                        "match": "gte"
                    },
                    "action": {
                        "operator": "AND",
                        "filters": [{
                            "scope": "actions",
                            "value": "checkout",
                            "match": "contains",
                            "key": "name"
                        }]
                    },
                    "timeframe": {
                        "to": 0,
                        "method": "relative",
                        "from": 29
                    },
                    "visit": {
                         "operator": "AND",
                         "filters": [{
                            "scope": "visits",
                            "value": "US",
                            "match": "match",
                            "key": "country"
                    }]
                }
            }]
        }
    }]
}

Read the Segmentation Filters on how to populate the filterObject data

CRUD Operations

Create

Endpoint

http(s)://www.woopra.com/rest/[version]/userdata/add

Parameters

Name Description
website website as registered in Woopra
type labels
properties user-specific JSON properties ex: {“enabled”:true}
meta JSON content

Update

Endpoint

http(s)://www.woopra.com/rest/[version]/userdata/update

Parameters

Name Description
website website as registered in Woopra
uid object unique ID (generated by woopra when created)
meta JSON content

Delete

Endpoint

http(s)://www.woopra.com/rest/[version]/userdata/delete

Parameters

Name Description
website website as registered in Woopra
uid object unique ID (generated by woopra when created)

List

Endpoint

http(s)://www.woopra.com/rest/[version]/userdata/list

Parameters

Name Description
website website as registered in Wopra
type “labels”
curl --user appID:secretKey 'https://www.woopra.com/rest/2.3/userdata/list?website=my-business.com&type=labels' > labels.json

Update User-Specific Settings

Endpoint

http(s)://www.woopra.com/rest/[version]/userdata/properties/update

Parameters

Name Description
website website as registered in Woopra
uid object unique ID (generated by woopra when created)
properties user-specific JSON properties ex: {“enabled”:true}

Do you know what your customers are doing?
Find out in 5 minutes.

Try Woopra for free. No credit cards. No obligations.

Start for free