Smart card - Analytics

All Linking events are currently fired on the 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:

EventData Portal
smartLink renderSuccessView in Data Portal
hoverCard viewedView in Data Portal
hoverCard dismissedView in Data Portal
link clickedView in Data Portal

Link Lifecycle (Created / Updated / Deleted) Events

See the @atlaskit/analytics-next, (opens new window) page for more information.

EventData 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

SurfaceLocation Value(s)
Editor (@atlaskit/editor-core)editor_fixedWidth, editor_fullWidth, editor_chromeless, editor_comment, editor_mobile
Renderer (@atlaskit/renderer)renderer

Confluence

SurfaceLocation Value(s)
Confluence ShortcutsconfluenceShortcuts

Jira

SurfaceLocation Value(s)
Jira Issue View — Web LinksjiraWebLinks
Jira Issue View — Confluence Page LinksjiraLinkedConfluencePages