react-microsoft-clarity
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -6,3 +6,3 @@ export module clarity { | ||
*/ | ||
export function initialize(id: string): void; | ||
export function init(id: string): void; | ||
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
export function initialized(): boolean; | ||
export function hasStarted(): boolean; | ||
@@ -15,0 +15,0 @@ /** |
10
index.js
@@ -6,3 +6,3 @@ var clarityInit = require("./src/react-clarity"); | ||
if (!window.clarity) { | ||
throw new Error("Hotjar is not initialized"); | ||
throw new Error("Clarity is not initialized"); | ||
} | ||
@@ -13,7 +13,7 @@ | ||
function initialize(id) { | ||
function init(id) { | ||
clarityInit(id); | ||
} | ||
function initialized() { | ||
function hasStarted() { | ||
return typeof window.clarity === "function"; | ||
@@ -32,4 +32,4 @@ } | ||
clarity: { | ||
initialize, | ||
initialized, | ||
init, | ||
hasStarted, | ||
identify, | ||
@@ -36,0 +36,0 @@ upgrade, |
{ | ||
"name": "react-microsoft-clarity", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "A simple small component to implement Microsoft Clarity into your React Application", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,4 @@ # react-microsoft-clarity | ||
clarity.initialize(id); | ||
// Start seeing data on the Clarity dashboard with your id | ||
clarity.init(id); | ||
@@ -19,7 +20,7 @@ // Identify the user | ||
// Upgrade Session | ||
clarity.upgrade('Upgrade_Reason'); | ||
// Upgrade session | ||
clarity.upgrade('upgradeReason'); | ||
// Check if Hotjar has been initialized before calling its methods | ||
if (clarity.initialized()) { | ||
// Check if Clarity has been initialized before calling its methods | ||
if (clarity.hasStarted()) { | ||
clarity.identify('USER_ID', { userProperty: 'value' }); | ||
@@ -26,0 +27,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4484
30