-
-
Save snehil002/8082be5ddc37ab840eea74da73d064a8 to your computer and use it in GitHub Desktop.
Web Analytics Tool - Data Requested and Fetched by the Dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fetch URL */ | |
const url = "MY_SERVER_API_HERE" + | |
`/get-metric/` + `?` + `visitedurl=${visitedUrl}` + `&metricname=${metricName}` + | |
`×tringi=${timeStringI}` + `×tringf=${timeStringF}` + | |
`&timezone=${timeZone}`; | |
/* Data Requested by The DashBoard */ | |
* const visitedUrl = PATH_NAME_OF_THE_TRACKED_WEBSITE | |
* const metricName = //Metric Name - hourly, daily, monthly, device width, traffic source; | |
* const timeStringI = Initial Date in Local Time of Client | |
* const timeStringF = Final Date in Local Time of Client | |
* Visitor Count on the Requested URL within the said Time Interval | |
* Average Time spent by visitors on the Requested URL within the said Time Interval | |
/* Data Fetched By The DashBoard */ | |
{ | |
"xaxis" : ['3 Jan', '4 Jan', '5 Jan', '6 Jan', '7 Jan', '8 Jan'], | |
"yaxis" : { | |
"visitorCount": { | |
"data": [12, 19, 3, 5, 2, 3], | |
"ylabel": "Number of Visitors on different Days in the requested Time Interval" | |
}, | |
"avgTime": { | |
"data": [12, 19, 3, 5, 2, 3], | |
"ylabel": "Average Time Spent by Visitors on different Days in the requested Time Interval" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment