Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
hotjar-slack-notifier
Advanced tools
This script was created to run periodically on my machine, with the purpose of forwarding the latest Hotjar responses to a Slack channel.
This script was created to run periodically on my machine, with the purpose of forwarding the latest Hotjar responses to a Slack channel.
npm install hotjar-slack-notifier
or yarn add hotjar-slack-notifier
{ lastIndex: 0 }
Free tools include https://jsonstorage.net http://myjson.com https://jsonbin.io or even Firebase. Keep the API version of the URL handy.const HJSlack = require('hotjar-slack-notifier');
HJSlack({
hotjarSiteId: 123456,
hotjarPollId: 789012,
currentIndexUrl: 'https://...',
slackWebhookUrl: 'https://hooks.slack.com/...',
username: 'email@domain.com',
password: 'hunter2',
});
The two Hotjar values can best be discovered by dissassembling the URL of the page containing the responses to the poll you're interested in.
Parameter | Description | Type |
---|---|---|
hotjarSiteId | This is the ID associated with your Hotjar instance | String/Integer |
hotjarPollId | This is the ID associated the particular poll you are interested in monitoring the responses to | String/Integer |
currentIndexUrl | The URL of an endpoint that accepts GET/PUT API calls to both fetch and update the index (Integer) of the last Hotjar poll response | String (URL) |
slackWebhookUrl | The URL of the Slack webhook to invoke | String (URL) |
username | DANGER: Your Hotjar account username (appears to be an email address). | String |
password | DANGER: Your Hotjar password | String |
At the time of authoring, Hotjar does not offer a public API nor a Slack plugin. While writing one would facilitate the other, Hotjar have stated that a Slack plugin is not going to be included in their roadmap. While Hotjar does have an API, it is for their internal use only and there is no public access to it.
For the above reason, there is no other way to authenticate with their (private) API than to login as yourself and intercept the API requests used to build the poll responses page
Because all they are storing is a single integer, the index of the last response that was "seen" by the script and posted to Slack.
Sometimes puppeteer can be a bit flakey, even with high speed fibre internet. It may struggle to load and find the login form on the page.
Ensure that you are:
api.service.com/id/
vs service.com/id
){ lastIndex: 0 }
for the first loadMaybe the line above should have been -1
not 0
🤷♀
Ensure that the JSON storage service you are using supports PUTs.
This software is provided as is. You are entering your username and password into a third party script. You do so at your own risk.
FAQs
This script was created to run periodically on my machine, with the purpose of forwarding the latest Hotjar responses to a Slack channel.
We found that hotjar-slack-notifier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.