henk-badenhorst / vue-hotjar Goto Github PK
View Code? Open in Web Editor NEWA NPM package to easily integrate Hotjar to any Vue 2 Project
Home Page: https://www.npmjs.com/package/vue-hotjar
License: MIT License
A NPM package to easily integrate Hotjar to any Vue 2 Project
Home Page: https://www.npmjs.com/package/vue-hotjar
License: MIT License
I have implemented hotjar with your module but I noticed that during the recording, the css is not loaded and I find myself with a recording without css
Hi!
Great plugin for hotjar in vue. But I have a problem, hotjar detect 2 scripts in my code. I just add one hotjar script from this plugin only. How can I solve this? Thank you
Hi,
I was wondering if you were thinking of updating the package to support Vue3?
I get the error:
main.js
app.use(Hotjar, {
id: "XXXXXXX",
isProduction: true
});
error
vue-hotjar.js:4 Uncaught TypeError: Cannot set property '$hj' of undefined
at Object.install (vue-hotjar.js:4)
at Object.use (vue.js:4091)
at main.js:32
Thanks,
First of all, thanks for the library @henk-badenhorst !
Now, for the issue, I'm running into a limitation with this library, as with the current implementation, we don't have access to the hj
function to track changes manually.
I already did a workaround using a local implementation of your library, I don't know if you're interested in a PR to add it here.
If yes, I'd be glad to open a PR with the proposed change.
Thanks!
How would I track user data using this lib, bellow is the example from the docs, not sure if it's supported via this lib?
<!-- Install this snippet AFTER the Hotjar tracking code. -->
<script>
var userId = your_user_id || null; // Replace your_user_id with your own if available.
window.hj('identify', userId, {
// Add your own custom attributes here. Some EXAMPLES:
// 'Signed up': '2019โ06-20Z', // Signup date in ISO-8601 format.
// 'Last purchase category': 'Electronics', // Send strings with quotes around them.
// 'Total purchases': 15, // Send numbers without quotes.
// 'Last purchase date': '2019-06-20Z', // Send dates in ISO-8601 format.
// 'Last refund date': null, // Send null when no value exists for a user.
});
</script>
I have strange error - Hotjar is being detected on localhost when isProduction: true
, but when I change it to isProduction: process.env.NODE_ENV !== 'development'
it's no detected on the production site even though code appears in the source:
Can I ask for help in that regard?
Site in question: https://doctempleapp.com/?hjVerifyInstall=2070936
Hello, I'm getting some error when trying to use the package with TypeScript, any ideas on how to solve it? Thanks!
Argument of type 'typeof import("/Users/xxxxxx/project_name/node_modules/vue-hotjar/dist/types/index")' is not assignable to parameter of type 'Plugin_2'.
Property 'install' is missing in type 'typeof import("/Users/xxxxxx/project_name/node_modules/vue-hotjar/dist/types/index")' but required in type '{ install: PluginInstallFunction; }'.
4 | export function loadHotjar(app: App) {
> 5 | app.use(Hotjar, {
| ^^^^^^
6 | id: process.env.VUE_APP_HOTJAR, // Hotjar Site ID
7 | isProduction: true
8 | });
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.