-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(PGIO-114): Analytics - track important events (#131)
* feat: create initial FA events and formating utils * feat: add events tracking for market details interactions * feat: add events tracking for our landing and markets list display interactions * feat: add events tracking to LiFi sDAI widget interaction * feat: add footer and embed market tracking events * chore: remove deprecated options from FA Load function * feat: add bets view and redeem events * feat: add the news URL to the FA news tracking event * feat: add devconflict category and banner events
- Loading branch information
1 parent
c78b054
commit a729c53
Showing
14 changed files
with
226 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { SDAI } from '@/constants'; | ||
|
||
const formatEventName = (eventName: string) => | ||
eventName.split(' ').join('-').toLocaleLowerCase(); | ||
|
||
export const FA_EVENTS = { | ||
BETS: { | ||
MY_BETS: 'click/bets/my-bets', | ||
REDEEM: 'click/bets/redeem', | ||
}, | ||
DEVCONFLICT: 'click/devconflict-banner', | ||
FOOTER: { | ||
CONNECT: { | ||
DISCORD: 'click/footer/connect/discord', | ||
GITHUB: 'click/footer/connect/github', | ||
X: 'click/footer/connect/x', | ||
}, | ||
HOME: 'click/footer/home', | ||
MARKET_CATEGORY: (category: string) => `click/footer/markets/${category}`, | ||
POWERED_BY: { | ||
GNOSIS: 'click/footer/powered-by/gnosis', | ||
GNOSIS_AI: 'click/footer/powered-by/gnosis-ai', | ||
KLEROS: 'click/footer/powered-by/kleros', | ||
REALITY: 'click/footer/powered-by/reality', | ||
}, | ||
}, | ||
LIFI_WIDGET: { | ||
OPEN: `click/lifi-widget/open-${SDAI.symbol}`, | ||
ROUTE_FAILED: 'click/lifi-widget/route-failed', | ||
ROUTE_SUCCESS: 'click/lifi-widget/route-success', | ||
}, | ||
MARKETS: { | ||
CATEGORY: (category: string) => `click/markets/category-${category}`, | ||
DETAILS: { | ||
EMBED: { | ||
COPIED: 'click/markets/details/embed/copied', | ||
ID: 'click/markets/details/embed', | ||
}, | ||
ID: (id: string) => `click/markets/details/${id}`, | ||
INFO: { | ||
CONTRACT: 'click/markets/details/info/chain-scanner', | ||
DISPUTE: 'click/markets/details/info/kleros', | ||
ORACLE_ANSWER: 'click/markets/details/info/reality', | ||
}, | ||
TABS: { | ||
NAME: (tabName: string) => `click/markets/details/tabs/${tabName}`, | ||
NEWS_ARTICLE: 'click/markets/details/tabs/news-article', | ||
}, | ||
}, | ||
FILTERS: { | ||
CREATOR: (creatorName: string) => | ||
`click/markets/filters/creator-${formatEventName(creatorName)}`, | ||
ORDER: (orderName: string) => | ||
`click/markets/filters/order-${formatEventName(orderName)}`, | ||
STATE: (stateName: string) => | ||
`click/markets/filters/state-${formatEventName(stateName)}`, | ||
TOKEN: (tokenName: string) => | ||
`click/markets/filters/token-${formatEventName(tokenName)}`, | ||
}, | ||
SEARCH_BAR: `click/markets/search-bar`, | ||
}, | ||
}; |
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
Oops, something went wrong.