Smart card - Analytics
media
channel which we share with Media Platform, so we also share the Media Platform analytics listeners.Smart Link Events
Analytics are generally fired when a UI interaction occurs with a SmartCard component or when the state of the SmartCard component changes (i.e., resolves).
Here are a few of our more important events fired from Smart Cards:
Event | Data Portal |
---|---|
smartLink renderSuccess | View in Data Portal |
hoverCard viewed | View in Data Portal |
hoverCard dismissed | View in Data Portal |
link clicked | View in Data Portal |
Link Lifecycle (Created / Updated / Deleted) Events
See the @atlaskit/analytics-next, (opens new window) page for more information.
Event | Data Portal |
---|---|
link created (client) | View in Data Portal |
link updated (client) | View in Data Portal |
link deleted (client) | View in Data Portal |
Providing Context to Smart Links
We recommend Smart Link adopters provide an Analytics Context around surfaces where Smart Links are
integrated to help identify where Smart Link features are in play. This context should wrap all Smart
Link platform componentry including the <Card />
component as well as any exposed hooks in use.
For the moment, we look for adopters to use analytics context to supply a location
attribute, but
in future we may look to acquire additional context.
import { AnalyticsContext } from '@atlaskit/analytics-next';
import { SmartCardProvider } from '@atlaskit/link-provider';
import { Card } from '@atlaskit/smart-card';
const Component = () => {
return (
<AnalyticsContext data={{ attributes: { location: 'jiraWebLinks' } }}>
<SmartCardProvider>
<Card url="https://atlassian.com" />
</SmartCardProvider>
</AnalyticsContext>
)
}
Established Locations
Below are some known and established values for location
(this is not exhaustive):
All Products
Surface | Location Value(s) |
---|---|
Editor (@atlaskit/editor-core ) | editor_fixedWidth , editor_fullWidth , editor_chromeless , editor_comment , editor_mobile |
Renderer (@atlaskit/renderer ) | renderer |
Confluence
Surface | Location Value(s) |
---|---|
Confluence Shortcuts | confluenceShortcuts |
Jira
Surface | Location Value(s) |
---|---|
Jira Issue View — Web Links | jiraWebLinks |
Jira Issue View — Confluence Page Links | jiraLinkedConfluencePages |