Modules@robinpath/hotjar
hotjar

@robinpath/hotjar

0.1.1Node.jsPublic

Hotjar 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.listSurveys to perform this operation
  • getSurvey -- Use hotjar.getSurvey to perform this operation
  • getSurveyResponses -- Use hotjar.getSurveyResponses to perform this operation
  • listFeedback -- Use hotjar.listFeedback to perform this operation
  • getFeedbackItem -- Use hotjar.getFeedbackItem to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure hotjar credentials.object
listSurveyslistSurveysobject
getSurveygetSurveyobject
getSurveyResponsesgetSurveyResponsesobject
listFeedbacklistFeedbackobject
getFeedbackItemgetFeedbackItemobject
listHeatmapslistHeatmapsobject
getHeatmapgetHeatmapobject
listRecordingslistRecordingsobject
getRecordinggetRecordingobject
getSiteInfogetSiteInfoobject
getUserInfogetUserInfoobject
getSessionCountgetSessionCountobject

Functions

setCredentials

Configure hotjar credentials.

Module: hotjar | Returns: object -- API response.

hotjar.setCredentials
ParameterTypeRequiredDescription
accessTokenstringYesaccessToken
siteIdstringYessiteId

listSurveys

listSurveys

Module: hotjar | Returns: object -- API response.

hotjar.listSurveys
ParameterTypeRequiredDescription
inputstringNoInput parameter

getSurvey

getSurvey

Module: hotjar | Returns: object -- API response.

hotjar.getSurvey
ParameterTypeRequiredDescription
inputstringNoInput parameter

getSurveyResponses

getSurveyResponses

Module: hotjar | Returns: object -- API response.

hotjar.getSurveyResponses
ParameterTypeRequiredDescription
inputstringNoInput parameter

listFeedback

listFeedback

Module: hotjar | Returns: object -- API response.

hotjar.listFeedback
ParameterTypeRequiredDescription
inputstringNoInput parameter

getFeedbackItem

getFeedbackItem

Module: hotjar | Returns: object -- API response.

hotjar.getFeedbackItem
ParameterTypeRequiredDescription
inputstringNoInput parameter

listHeatmaps

listHeatmaps

Module: hotjar | Returns: object -- API response.

hotjar.listHeatmaps
ParameterTypeRequiredDescription
inputstringNoInput parameter

getHeatmap

getHeatmap

Module: hotjar | Returns: object -- API response.

hotjar.getHeatmap
ParameterTypeRequiredDescription
inputstringNoInput parameter

listRecordings

listRecordings

Module: hotjar | Returns: object -- API response.

hotjar.listRecordings
ParameterTypeRequiredDescription
inputstringNoInput parameter

getRecording

getRecording

Module: hotjar | Returns: object -- API response.

hotjar.getRecording
ParameterTypeRequiredDescription
inputstringNoInput parameter

getSiteInfo

getSiteInfo

Module: hotjar | Returns: object -- API response.

hotjar.getSiteInfo
ParameterTypeRequiredDescription
inputstringNoInput parameter

getUserInfo

getUserInfo

Module: hotjar | Returns: object -- API response.

hotjar.getUserInfo
ParameterTypeRequiredDescription
inputstringNoInput parameter

getSessionCount

getSessionCount

Module: hotjar | Returns: object -- API response.

hotjar.getSessionCount
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
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)

VersionTagPublished
0.1.1latest1 months ago
Install
$ robinpath add @robinpath/hotjar

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.1
LicenseMIT
Unpacked Size4.0 KB
Versions1
Weekly Downloads26
Total Downloads26
Stars0
Last Publish1 months ago
Created1 months ago

Category

data