Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LinkedIn Video Analytics timeRange

I want to fetch video analytics by date range.

I followed Video Analytics API, https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/video-analytics-api

But I get an error.

Didn't find any other reference in the Web.

It should be noted that I fetch lifetime data (without time range parameter) successfully and that encodeURIComponent didn't help.

The request:

https://api.linkedin.com/v2/videoAnalytics?q=entity&entity=urn:li:ugcPost:6516733420171780096&type=VIEWER&aggregation=DAY&timeRange=(start:1553385600000,end:1553817600000)

The error:

{
   "message": "Parameter 'timeRange' is invalid",
   "status": 400
}

Edit:

using epoch - no error, but also no metrics data

even I got metrics in fetching lifetime, when fetching dateRange, and I tried several date ranges from video creation date until today - returns empty array.

{
   "elements": [],
   "paging": {
       "total": 0,
       "count": 10,
       "start": 0,
       "links": [],
    }
}

trying fetching ALL - to mimic lifetime - also returns empty array:

https:/api.linkedin.com/v2/videoAnalytics?q=entity&entity=urn%3Ali%3AugcPost%3A6516733420171780096&type=VIEWER&timeRange=(start:1552176000,end:1564012800)&aggregation=ALL

weird - even trying to get an error by switching start date and end date returns empty array.

like image 669
Amichay Miara Avatar asked Nov 07 '22 15:11

Amichay Miara


1 Answers

You need epoch time, not miliseconds

Try replacing time with start:1563969600,end:1564401600

Converter -> https://www.epochconverter.com/

like image 111
xNaii Avatar answered Dec 31 '22 15:12

xNaii