Hubpost: IllegalDimensionMetricCombinationException but can access via API

Hi!

I'm trying to get Lifecycle stages a) preferably split by Source, but otherwise  b) filtered by a single source (then I'd run the query multiple times once for each source). I'm able to achieve a) via API call (below) and b) via the Report Builder in Hubspot (screenshot).

Can you please tell me which metrics / dimensions to select to achieve this? My minimal proof of concept is returning:

Error: Incompatible fields: analytics_source, contact_marketing_qualified_lead_count IllegalDimensionMetricCombinationException


Thanks, Tim


https://api.hubapi.com/contacts/search/v1/external/lifecyclestages?fromTimestamp=1569852000000&toTimestamp=1572526800000&aggregationProperty=hs_analytics_source


[ { "lifecycleStage": "hs_lifecyclestage_lead_date", "count": 131, "aggregation": { "count": 131, "aggregations": { "hs_analytics_source": [ { "key": "OFFLINE", "count": 92 }, { "key": "DIRECT_TRAFFIC", "count": 15 }, { "key": "PAID_SEARCH", "count": 13 }, { "key": "ORGANIC_SEARCH", "count": 8 }, { "key": "EMAIL_MARKETING", "count": 1 }, { "key": "REFERRALS", "count": 1 }, { "key": "SOCIAL_MEDIA", "count": 1 } ] } } }, { "lifecycleStage": "hs_lifecyclestage_opportunity_date", "count": 10, "aggregation": { "count": 10, "aggregations": { "hs_analytics_source": [ { "key": "OFFLINE", "count": 6 }, { "key": "DIRECT_TRAFFIC", "count": 4 } ] } } }, { "lifecycleStage": "hs_lifecyclestage_marketingqualifiedlead_date", "count": 73, "aggregation": { "count": 73, "aggregations": { "hs_analytics_source": [ { "key": "OFFLINE", "count": 50 }, { "key": "PAID_SEARCH", "count": 13 }, { "key": "DIRECT_TRAFFIC", "count": 6 }, { "key": "ORGANIC_SEARCH", "count": 2 }, { "key": "REFERRALS", "count": 1 }, { "key": "SOCIAL_MEDIA", "count": 1 } ] } } }, { "lifecycleStage": "hs_lifecyclestage_salesqualifiedlead_date", "count": 17, "aggregation": { "count": 17, "aggregations": { "hs_analytics_source": [ { "key": "DIRECT_TRAFFIC", "count": 6 }, { "key": "ORGANIC_SEARCH", "count": 6 }, { "key": "OFFLINE", "count": 3 }, { "key": "PAID_SEARCH", "count": 2 } ] } } }, { "lifecycleStage": "hs_lifecyclestage_evangelist_date", "count": 0, "aggregation": { "count": 0, "aggregations": { "hs_analytics_source": [] } } }, { "lifecycleStage": "hs_lifecyclestage_customer_date", "count": 14, "aggregation": { "count": 14, "aggregations": { "hs_analytics_source": [ { "key": "OFFLINE", "count": 13 }, { "key": "DIRECT_TRAFFIC", "count": 1 } ] } } }, { "lifecycleStage": "hs_lifecyclestage_subscriber_date", "count": 158, "aggregation": { "count": 158, "aggregations": { "hs_analytics_source": [ { "key": "OFFLINE", "count": 158 } ] } } }, { "lifecycleStage": "hs_lifecyclestage_other_date", "count": 0, "aggregation": { "count": 0, "aggregations": { "hs_analytics_source": [] } } } ]


Login or Signup to post a comment