-
Open DevTools, Navigate to the
Network
tab and selectfetch/xhr
-
Navigate to Cogeco's portal https://myaccount.cogeco.ca/acauth/all/internet/usage
-
Find this network request, select
Response
and copy the whole contents of the response
- Navigate to the
Console
in Devtools and type
const res =
Then paste your copied response after the equals sign. It should look something like:
const res = {
appId: "<app id>",
...other fields
}
- Hit enter to save the
res
variable. You should seeundefined
in the console.
- Copy and paste this code to see aggregated bandwidth usage (Upload and Download) for all billing periods on the account.
Object.fromEntries(res.internetDetailedUsages.locationList[0].productList[0].periodUsageList.map(usageList => [`${new Date(usageList.startDate).toLocaleString('default', { month: 'long' })}-${new Date(usageList.endDate).toLocaleString('default', { month: 'long' })}`, usageList.usageDiscountList[0].usageList.reduce((acc, current) => acc + +current.total, 0)]))