Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@masa-finance/analytics-sdk

Package Overview
Dependencies
Maintainers
5
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@masa-finance/analytics-sdk - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

12

dist/package.json
{
"name": "@masa-finance/analytics-sdk",
"version": "0.5.4",
"version": "0.5.5",
"main": "dist/src/index.js",

@@ -18,10 +18,10 @@ "license": "MIT",

"devDependencies": {
"@types/node": "^20.11.16",
"@types/node": "^20.11.10",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"prettier": "^3.2.5",
"prettier": "^3.2.4",
"process": "^0.11.10",

@@ -32,3 +32,3 @@ "ts-loader": "^9.5.1",

"typescript": "^5.3.3",
"webpack": "^5.90.1",
"webpack": "^5.90.0",
"webpack-cli": "^5.1.4"

@@ -35,0 +35,0 @@ },

@@ -1,2 +0,2 @@

import { FireElementClickEventArgs, FireConnectWalletEventArgs, FireEventArgs, FireLoginEventArgs, FireMintEventArgs, FirePageViewEventArgs } from "./interfaces";
import { FireConnectWalletEventArgs, FireElementClickEventArgs, FireEventArgs, FireLoginEventArgs, FireMintEventArgs, FirePageViewEventArgs } from "./interfaces";
import { MasaAnalyticsClient } from "./masa-analytics-client";

@@ -3,0 +3,0 @@ export declare class MasaAnalytics {

@@ -57,3 +57,3 @@ "use strict";

this.clickedElements = {};
this.userAddress = null; // Add this line
this.userAddress = null;
this._client = new masa_analytics_client_1.MasaAnalyticsClient({

@@ -83,9 +83,11 @@ apiUrl: this.config.apiUrl,

MasaAnalytics.prototype.handleDocumentClick = function (event) {
if (event.target === document.body ||
var _a;
if (!event.target ||
event.target === document.body ||
event.target === document.documentElement ||
event.target.id === "app") {
(event.target.id !== null && event.target.id === "app")) {
console.log("Click on non-content area ignored.");
return; // Ignore clicks on these areas
}
if (event.target.nodeType !== Node.ELEMENT_NODE) {
if (!(event.target instanceof Element)) {
return; // Ignore non-element nodes

@@ -99,3 +101,3 @@ }

":" +
event.target.textContent.trim()).trim();
((_a = event.target.textContent) !== null && _a !== void 0 ? _a : "").trim()).trim();
// Initialize clickedElements object if not already initialized

@@ -119,9 +121,10 @@ if (!this.clickedElements) {

MasaAnalytics.prototype.extractElementData = function (element) {
var _a, _b, _c, _d;
return {
page_url: window.location.href,
page_title: document.title,
element_id: element.id || undefined,
element_text: element.textContent.trim() || undefined,
element_class: element.className || undefined,
user_address: this.userAddress ? this.userAddress : undefined, // Populate this as needed
element_id: (_a = element.id) !== null && _a !== void 0 ? _a : "",
element_text: (_b = element.textContent) !== null && _b !== void 0 ? _b : "",
element_class: (_c = element.className) !== null && _c !== void 0 ? _c : "",
user_address: (_d = this.userAddress) !== null && _d !== void 0 ? _d : "", // Populate this as needed
additionalEventData: {}, // Any additional data you wish to include

@@ -128,0 +131,0 @@ };

{
"name": "@masa-finance/analytics-sdk",
"version": "0.5.4",
"version": "0.5.5",
"main": "dist/src/index.js",

@@ -18,10 +18,10 @@ "license": "MIT",

"devDependencies": {
"@types/node": "^20.11.16",
"@types/node": "^20.11.10",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"prettier": "^3.2.5",
"prettier": "^3.2.4",
"process": "^0.11.10",

@@ -32,3 +32,3 @@ "ts-loader": "^9.5.1",

"typescript": "^5.3.3",
"webpack": "^5.90.1",
"webpack": "^5.90.0",
"webpack-cli": "^5.1.4"

@@ -35,0 +35,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc