I need to use hotjar for work, but i have some difficulties to set it up. The project is an ember project, and i have found this project to integrate hotjar : https://github.com/byrnedo/ember-hotjar
In this github page, it says : "in routes and controller you will have _hj.push available", but i can't manage to make it work and i can't find any information about how to set it up.
I added this in config/environment.js :
hotjar: {
id: my-id
},
And in a route, if i do this :
console.log(this.get('_hj'))
I get this result in the console :
ƒ () {
(window.hj.q = window.hj.q || []).push(arguments);
}
Meaning that hotjar is successfully installed, but when i'm trying to something like :
this.get('_hj').push('trigger', 'hello_world');
An error appears saying :
Uncaught TypeError: this.get(...).push is not a function
Does anyone know how to make it work or if i'm making something wrong ?
Aucun commentaire:
Enregistrer un commentaire