File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/app/src/embed/components Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { camelizeKeys } from 'humps';
55import getTemplateDefinition from '@codesandbox/common/lib/templates' ;
66import type { Module , Sandbox } from '@codesandbox/common/lib/types' ;
77import Centered from '@codesandbox/common/lib/components/flex/Centered' ;
8+ import track from '@codesandbox/common/lib/utils/analytics' ;
89import { getSandboxOptions } from '@codesandbox/common/lib/url' ;
910import {
1011 findCurrentModule ,
@@ -18,7 +19,7 @@ import Sidebar from '../Sidebar';
1819import { Container , Fullscreen , Moving } from './elements' ;
1920
2021// Okay, this looks veeeery strange, we need this because Webpack has a bug currently
21- // that makes it think we have core -js/es6/map available in embed, but we don't.
22+ // that makes it think we havecore -js/es6/map available in embed, but we don't.
2223// So we explicitly make sure that we have `core-js/es6/map` available by declaring
2324// new Map.
2425new Map ( ) ; // eslint-disable-line
@@ -245,6 +246,7 @@ export default class App extends React.PureComponent<
245246
246247 toggleLike = ( ) => {
247248 const jwt = this . jwt ( ) ;
249+ track ( 'Embed - Toggle Like' ) ;
248250
249251 if ( this . state . sandbox . userLiked && jwt ) {
250252 this . setState ( s => ( {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 sandboxUrl ,
1111 embedUrl ,
1212} from '@codesandbox/common/lib/utils/url-generator' ;
13+ import track from '@codesandbox/common/lib/utils/analytics' ;
1314
1415import LinkIcon from './Link' ;
1516
@@ -36,6 +37,7 @@ type Props = {
3637} ;
3738
3839const copyToClipboard = str => {
40+ track ( 'Embed - Copy URL' ) ;
3941 const el = document . createElement ( 'textarea' ) ;
4042 el . value = str ;
4143 el . setAttribute ( 'readonly' , '' ) ;
You can’t perform that action at this time.
0 commit comments