@robinpath/hotjar
0.1.1Node.jsPublicHotjar module for RobinPath.
Hotjar
Hotjar module for RobinPath.
Package: @robinpath/hotjar | Category: Analytics | Type: Integration
Authentication
hotjar.setCredentials "your-credentials"
Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.
Use Cases
Use the hotjar module when you need to:
- listSurveys -- Use
hotjar.listSurveysto perform this operation - getSurvey -- Use
hotjar.getSurveyto perform this operation - getSurveyResponses -- Use
hotjar.getSurveyResponsesto perform this operation - listFeedback -- Use
hotjar.listFeedbackto perform this operation - getFeedbackItem -- Use
hotjar.getFeedbackItemto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure hotjar credentials. | object |
listSurveys | listSurveys | object |
getSurvey | getSurvey | object |
getSurveyResponses | getSurveyResponses | object |
listFeedback | listFeedback | object |
getFeedbackItem | getFeedbackItem | object |
listHeatmaps | listHeatmaps | object |
getHeatmap | getHeatmap | object |
listRecordings | listRecordings | object |
getRecording | getRecording | object |
getSiteInfo | getSiteInfo | object |
getUserInfo | getUserInfo | object |
getSessionCount | getSessionCount | object |
Functions
setCredentials
Configure hotjar credentials.
Module: hotjar | Returns: object -- API response.
hotjar.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | accessToken |
siteId | string | Yes | siteId |
listSurveys
listSurveys
Module: hotjar | Returns: object -- API response.
hotjar.listSurveys
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getSurvey
getSurvey
Module: hotjar | Returns: object -- API response.
hotjar.getSurvey
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getSurveyResponses
getSurveyResponses
Module: hotjar | Returns: object -- API response.
hotjar.getSurveyResponses
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listFeedback
listFeedback
Module: hotjar | Returns: object -- API response.
hotjar.listFeedback
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getFeedbackItem
getFeedbackItem
Module: hotjar | Returns: object -- API response.
hotjar.getFeedbackItem
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listHeatmaps
listHeatmaps
Module: hotjar | Returns: object -- API response.
hotjar.listHeatmaps
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getHeatmap
getHeatmap
Module: hotjar | Returns: object -- API response.
hotjar.getHeatmap
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listRecordings
listRecordings
Module: hotjar | Returns: object -- API response.
hotjar.listRecordings
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getRecording
getRecording
Module: hotjar | Returns: object -- API response.
hotjar.getRecording
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getSiteInfo
getSiteInfo
Module: hotjar | Returns: object -- API response.
hotjar.getSiteInfo
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getUserInfo
getUserInfo
Module: hotjar | Returns: object -- API response.
hotjar.getUserInfo
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getSessionCount
getSessionCount
Module: hotjar | Returns: object -- API response.
hotjar.getSessionCount
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Hotjar API error (${res.status}): ${t} | Check the error message for details |
hotjar.setCredentials requires accessToken, siteId. | Check the error message for details |
Hotjar: "..." not configured. Call hotjar.setCredentials first. | Check the error message for details |
@desc "List surveys and validate result"
do
set $result as hotjar.listSurveys
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Surveys
Retrieve all items and loop through them.
@desc "Setup authentication"
do
hotjar.setCredentials $token
enddo
@desc "List surveys and iterate results"
do
set $result as hotjar.listSurveys
each $item in $result
print $item
end
enddo
2. Multi-step Hotjar workflow
Chain multiple hotjar operations together.
@desc "Setup authentication"
do
hotjar.setCredentials $token
enddo
@desc "List surveys, get survey, and more"
do
set $r_listSurveys as hotjar.listSurveys
set $r_getSurvey as hotjar.getSurvey
set $r_getSurveyResponses as hotjar.getSurveyResponses
print "All operations complete"
enddo
3. Safe listSurveys with validation
Check results before proceeding.
@desc "Setup authentication"
do
hotjar.setCredentials $token
enddo
@desc "List surveys and validate result"
do
set $result as hotjar.listSurveys
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- json -- JSON module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | 1 months ago |
Related Modules
chart
JS@robinpathv0.1.2
Generate chart images (PNG/JPEG) using Chart.js. Supports bar, line, pie, doughnut, scatter, radar, polarArea, and bubble charts with auto-coloring and customizable titles, legends, and dimensions.
firebase
JS@robinpathv0.1.1
Firebase module for RobinPath.
graph
JS@robinpathv0.1.1
Graph data structures with BFS, DFS, Dijkstra's shortest path, topological sort, cycle detection, and connectivity
mixpanel
JS@robinpathv0.1.2
Mixpanel module for RobinPath.
$ robinpath add @robinpath/hotjar
