Giter VIP home page Giter VIP logo

hotjar's Introduction

hotjar

Javascript interop for Hotjar

Usage

Hotjar integrated using Tag Manager

import "package:hotjar/hotjar.dart";

main() {
  hj("trigger", "my-poll");
  hj("tagRecording",  ["tag1", "tag2"]);

  // or

  trigger("my-poll");
  tagRecording(["tag1", "tag2"]);
}

Hotjar manual install

import "package:hotjar/hotjar.dart";

main() async {
  loadHotjar("SITE_ID");

  hj("trigger", "my-poll");
  hj("tagRecording",  ["tag1", "tag2"]);

  // or

  trigger("my-poll");
  tagRecording(["tag1", "tag2"]);
}

hotjar's People

Contributors

lejard-h avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

pianetastudio

hotjar's Issues

Support for mobile platform

I want to use Hotjar for my mobile application is there any way to implement. because so far what know is that hotjar is available for web-only not for the mobile platform.

App Crash on Launch

I have this problem before the app starts. i have imported both
dart_browser_loader + js. in yaml , flutter clean and run and still getting this
`
Compiler message:
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../hotjar/lib/src/hotjar_base.dart:5:8: Error: Not found: 'dart:html'
import "dart:html";
^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:4:8: Error: Not found: 'dart:js'
import 'dart:js' as js;
^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js.dart:8:1: Error: Not found: 'dart:js'
export 'dart:js' show allowInterop, allowInteropCaptureThis;
^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:6:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:11:8: Error: Type 'ScriptElement' not found.
Future loadScript(
^^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:10:8: Error: Type 'StyleElement' not found.
Future loadInlineStyle(String style, {String id}) {
^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:28:8: Error: Type 'LinkElement' not found.
Future loadLink(
^^^^^^^^^^^
../hotjar/lib/src/hotjar_base.dart:28:8: Error: Type 'ScriptElement' not found.
Future _loaded;
^^^^^^^^^^^^^
../hotjar/lib/src/hotjar_base.dart:41:8: Error: Type 'ScriptElement' not found.
Future loadHotjar(String siteId) =>
^^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:4:5: Error: Type 'Element' not found.
Map<Element, Future> _mapper = {};
^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:6:30: Error: Type 'Element' not found.
Future waitLoad(T element) {
^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:95:25: Error: Type 'HttpRequest' not found.
void _openHttpRequest(HttpRequest request, String method, String url,
^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:30:25: Error: 'HttpRequest' isn't a type.
final _xhrs = new Set();
^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:20:3: Error: 'ScriptElement' isn't a type.
ScriptElement element = id != null
^^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:21:9: Error: Getter not found: 'document'.
? document.getElementById(id)
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:22:9: Error: Getter not found: 'document'.
: document.querySelector("script[src='$src']");
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:26:13: Error: Method not found: 'ScriptElement'.
element = ScriptElement()
^^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:44:3: Error: Getter not found: 'document'.
document.head.append(element);
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:53:6: Error: Getter not found: 'context'.
js.context.callMethod("eval", [script]);
^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:11:3: Error: 'StyleElement' isn't a type.
StyleElement element = id != null ? document.getElementById(id) : null;
^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:11:39: Error: Getter not found: 'document'.
StyleElement element = id != null ? document.getElementById(id) : null;
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:14:15: Error: Method not found: 'StyleElement'.
element = StyleElement()..innerHtml = style;
^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:18:5: Error: Getter not found: 'document'.
document.head.append(element);
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:34:3: Error: 'LinkElement' isn't a type.
LinkElement element = id != null
^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:35:9: Error: Getter not found: 'document'.
? document.getElementById(id)
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:36:9: Error: Getter not found: 'document'.
: document.querySelector("link[href='$href']");
^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:39:15: Error: Method not found: 'LinkElement'.
element = LinkElement()
^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:46:5: Error: Getter not found: 'document'.
document.head.append(element);
^^^^^^^^
../hotjar/lib/src/hotjar_base.dart:28:8: Error: 'ScriptElement' isn't a type.
Future _loaded;
^^^^^^^^^^^^^
../hotjar/lib/src/hotjar_base.dart:35:15: Error: Method not found: 'loadInlineScript'.
_loaded ??= loadInlineScript(_hJBaseScript, _scriptId);
^^^^^^^^^^^^^^^^
../hotjar/lib/src/hotjar_base.dart:42:5: Error: Method not found: 'loadInlineScript'.
loadInlineScript(_hjScript(siteId), _scriptId);
^^^^^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:4:5: Error: 'Element' isn't a type.
Map<Element, Future> _mapper = {};
^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:44:19: Error: Method not found: 'HttpRequest'.
var xhr = new HttpRequest();
^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:55:45: Error: Method not found: 'Blob'.
var blob = xhr.response == null ? new Blob([]) : xhr.response;
^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:56:24: Error: Method not found: 'FileReader'.
var reader = new FileReader();
^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+1/lib/src/browser_client.dart:95:25: Error: 'HttpRequest' isn't a type.
void _openHttpRequest(HttpRequest request, String method, String url,
^^^^^^^^^^^
../../../development/flutter/packages/flutter/lib/src/painting/_network_image_web.dart:64:12: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'.
return ui.webOnlyInstantiateImageCodecFromUrl(resolved); // ignore: undefined_function
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
�[38;5;248m#0 StandardFileSystem.entityForUri�[39;49m
�[38;5;248m#1 asFileUri (package:vm/kernel_front_end.dart:604:37)�[39;49m
�[38;5;248m#2 writeDepfile (package:vm/kernel_front_end.dart:799:21)�[39;49m
�[38;5;244m�[39;49m
�[38;5;248m#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:472:15)�[39;49m
�[38;5;244m�[39;49m
�[38;5;248m#4 _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:38:22)�[39;49m
�[38;5;248m#5 starter (package:flutter_frontend_server/server.dart:149:27)�[39;49m
�[38;5;248m#6 main (file:///b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30)�[39;49m
�[38;5;244m#7 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:32)�[39;49m
�[38;5;244m#8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)�[39;49m

Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/dev/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/Users/dev/development/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 26s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.