@masa-finance/analytics-react
Advanced tools
Comparing version 0.13.7 to 0.13.8
@@ -1,2 +0,2 @@ | ||
import { FireConnectWalletEventArgs, FireEventArgs, FireLoginEventArgs, FireMintEventArgs, FirePageViewEventArgs } from '@masa-finance/analytics-sdk'; | ||
import { FireConnectWalletEventArgs, FireEventArgs, FireLoginEventArgs, FireMintEventArgs, FirePageViewEventArgs, FireTrackCustomEventArgs } from '@masa-finance/analytics-sdk'; | ||
export declare const useMasaAnalyticsReact: ({ clientApp, clientName, clientId, }: { | ||
@@ -11,3 +11,4 @@ clientApp: string; | ||
fireConnectWalletEvent: (fireConnectWalletEventArgs: FireConnectWalletEventArgs) => Promise<void>; | ||
fireTrackCustomEvent: (fireTrackCustomEventArgs: FireTrackCustomEventArgs) => Promise<void>; | ||
fireMintEvent: (fireMintEventArgs: FireMintEventArgs) => Promise<void>; | ||
}; |
@@ -110,2 +110,15 @@ "use strict"; | ||
/** | ||
* Fire an event once a user tries to mint a token | ||
*/ | ||
var fireTrackCustomEvent = (0, react_1.useCallback)(function (fireTrackCustomEventArgs) { return __awaiter(void 0, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, masaAnalytics.fireTrackCustomEvent(fireTrackCustomEventArgs)]; | ||
case 1: | ||
_a.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); }, [masaAnalytics]); | ||
/** | ||
* Fire a flexible event | ||
@@ -129,2 +142,3 @@ * It can use any of the EventTypes | ||
fireConnectWalletEvent: fireConnectWalletEvent, | ||
fireTrackCustomEvent: fireTrackCustomEvent, | ||
fireMintEvent: fireMintEvent, | ||
@@ -131,0 +145,0 @@ }; |
{ | ||
"name": "@masa-finance/analytics-react", | ||
"version": "0.13.7", | ||
"version": "0.13.8", | ||
"description": "A customizable, easy-to-use React component for displaying a cookie consent banner on your website, written in TypeScript.", | ||
@@ -39,3 +39,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@masa-finance/analytics-sdk": "^0.5.4", | ||
"@masa-finance/analytics-sdk": "^0.5.8", | ||
"react": "^18.2.0" | ||
@@ -42,0 +42,0 @@ }, |
Sorry, the diff of this file is too big to display
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
510646
243