-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from indexnetwork/fix
Fix
- Loading branch information
Showing
12 changed files
with
95 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Plausible from "plausible-tracker"; | ||
|
||
const plausible = Plausible({ | ||
domain: "index.network", | ||
}); | ||
|
||
const events = { | ||
WALLET_CONNECTED: "wallet_connected", | ||
INDEX_CREATED: "index_created", | ||
CHAT_STARTED: "chat_started", | ||
ITEM_ADDED: "item_added", | ||
ITEM_STARRED: "item_starred", | ||
}; | ||
|
||
const trackEvent = (name: string, props?: Record<string, any>) => { | ||
if (process.env.NEXT_PUBLIC_API_URL === "https://index.network/api") { | ||
plausible.trackEvent(name, props); | ||
} | ||
plausible.trackEvent(name, props); | ||
}; | ||
|
||
export const WALLET_CONNECTED = events.WALLET_CONNECTED; | ||
export const INDEX_CREATED = events.INDEX_CREATED; | ||
export const CHAT_STARTED = events.CHAT_STARTED; | ||
export const ITEM_ADDED = events.ITEM_ADDED; | ||
export const ITEM_STARRED = events.ITEM_STARRED; | ||
|
||
export { trackEvent }; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters