2014-05-12 2 views
4

해당 API의 Mixpanel 데이터 내보내기 기능을 사용하려고합니다.Mixpanel 데이터 내보내기 여러 속성으로 필터링 내보내기

예상대로 api가 요청에 대한 매개 변수를 URL에 보내고 json 응답을 반환하도록 요청합니다.

실제 요청 방법은 기본적으로 다음과 같이 작동한다 :

data = api.request(['export'], { 
    'event': ['event_name'], 
    'from_date': from_date, 
    'to_date': to_date, 
    'where': 'properties["$property_name"]!=""' 
    }) 

'where': 'properties["$Search Engine"]!=""'

검색 엔진이 설정된 상기에서만 수출량 데이터. 이 외에도 다른 필터링 규칙을 어떻게 포함합니까? Mixpanel 문서는이 주제에 대해 아주 모범적 인 것으로 보인다.

나는 다음 시도했다 :

data = api.request(['export'], { 
    'event': ['event_name'], 
    'from_date': from_date, 
    'to_date': to_date, 
    'where': 'properties["$property_name"]!=""&properties["$second_property_name"]=="value"' 
    }) 

그러나 기쁨 (응답이 비어)와

.

여기의 도움을 주시면 감사하겠습니다.

답변

5

Mixpanel 데이터 내보내기 API는 부울 연산자로 /또는 키워드를 사용합니다.

그것은 조금 떨어진 문서에 자리 잡고 있지만, 당신은 분할 섹션에서 몇 가지 예제를 찾을 수 있어요 : https://mixpanel.com/docs/api-documentation/data-export-api#segmentation-default

그래서 당신의 예는 될 것입니다 :

'where': 'properties["$property_name"]!="" and properties["$second_property_name"]=="value"'