change(ui): removed tracker docs promise
This commit is contained in:
parent
369adfc3f5
commit
8deb37e8b0
10 changed files with 24 additions and 44 deletions
|
|
@ -18,8 +18,7 @@ import trackerProfiler from '@openreplay/tracker-profiler';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
//...
|
//...
|
||||||
export const profiler = tracker.use(trackerProfiler());
|
export const profiler = tracker.use(trackerProfiler());
|
||||||
//...
|
//...
|
||||||
|
|
@ -35,8 +34,7 @@ const tracker = new OpenReplay({
|
||||||
//...
|
//...
|
||||||
function SomeFunctionalComponent() {
|
function SomeFunctionalComponent() {
|
||||||
useEffect(() => { // or componentDidMount in case of Class approach
|
useEffect(() => { // or componentDidMount in case of Class approach
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
//...
|
//...
|
||||||
export const profiler = tracker.use(trackerProfiler());
|
export const profiler = tracker.use(trackerProfiler());
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@ import trackerAssist from '@openreplay/tracker-assist';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${props.projectKey}',
|
projectKey: '${props.projectKey}',
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
|
|
||||||
tracker.use(trackerAssist(options)); // check the list of available options below`;
|
tracker.use(trackerAssist(options)); // check the list of available options below`;
|
||||||
const usageCjs = `import OpenReplay from '@openreplay/tracker/cjs';
|
const usageCjs = `import OpenReplay from '@openreplay/tracker/cjs';
|
||||||
|
|
@ -23,8 +22,7 @@ const trackerAssist = tracker.use(trackerAssist(options)); // check the list of
|
||||||
//...
|
//...
|
||||||
function MyApp() {
|
function MyApp() {
|
||||||
useEffect(async () => { // use componentDidMount in case of React Class Component
|
useEffect(async () => { // use componentDidMount in case of React Class Component
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
//...
|
//...
|
||||||
}`;
|
}`;
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ import trackerGraphQL from '@openreplay/tracker-graphql';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
//...
|
//...
|
||||||
export const recordGraphQL = tracker.use(trackerGraphQL());`
|
export const recordGraphQL = tracker.use(trackerGraphQL());`
|
||||||
const usageCjs = `import OpenReplay from '@openreplay/tracker/cjs';
|
const usageCjs = `import OpenReplay from '@openreplay/tracker/cjs';
|
||||||
|
|
@ -29,8 +28,7 @@ const tracker = new OpenReplay({
|
||||||
//...
|
//...
|
||||||
function SomeFunctionalComponent() {
|
function SomeFunctionalComponent() {
|
||||||
useEffect(() => { // or componentDidMount in case of Class approach
|
useEffect(() => { // or componentDidMount in case of Class approach
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
}
|
}
|
||||||
//...
|
//...
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
tracker.use(trackerMobX(<options>)); // check list of available options below
|
tracker.use(trackerMobX(<options>)); // check list of available options below
|
||||||
// .start() returns a promise
|
tracker.start();
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... );
|
|
||||||
`
|
`
|
||||||
|
|
||||||
const mobxUsageCjs = `import OpenReplay from '@openreplay/tracker/cjs';
|
const mobxUsageCjs = `import OpenReplay from '@openreplay/tracker/cjs';
|
||||||
|
|
@ -32,8 +31,7 @@ tracker.use(trackerMobX(<options>)); // check list of available options below
|
||||||
//...
|
//...
|
||||||
function SomeFunctionalComponent() {
|
function SomeFunctionalComponent() {
|
||||||
useEffect(() => { // or componentDidMount in case of Class approach
|
useEffect(() => { // or componentDidMount in case of Class approach
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
}`
|
}`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ import trackerNgRx from '@openreplay/tracker-ngrx';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
//...
|
//...
|
||||||
const metaReducers = [tracker.use(trackerNgRx(<options>))]; // check list of available options below
|
const metaReducers = [tracker.use(trackerNgRx(<options>))]; // check list of available options below
|
||||||
//...
|
//...
|
||||||
|
|
@ -38,8 +37,7 @@ const tracker = new OpenReplay({
|
||||||
//...
|
//...
|
||||||
function SomeFunctionalComponent() {
|
function SomeFunctionalComponent() {
|
||||||
useEffect(() => { // or componentDidMount in case of Class approach
|
useEffect(() => { // or componentDidMount in case of Class approach
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
//...
|
//...
|
||||||
const metaReducers = [tracker.use(trackerNgRx(<options>))]; // check list of available options below
|
const metaReducers = [tracker.use(trackerNgRx(<options>))]; // check list of available options below
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ import trackerVuex from '@openreplay/tracker-vuex';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
//...
|
//...
|
||||||
const examplePiniaStore = useExamplePiniaStore()
|
const examplePiniaStore = useExamplePiniaStore()
|
||||||
// check list of available options below
|
// check list of available options below
|
||||||
|
|
@ -47,8 +46,7 @@ const tracker = new OpenReplay({
|
||||||
//...
|
//...
|
||||||
|
|
||||||
// start tracker when the app is mounted
|
// start tracker when the app is mounted
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
|
|
||||||
//...
|
//...
|
||||||
const examplePiniaStore = useExamplePiniaStore()
|
const examplePiniaStore = useExamplePiniaStore()
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ import trackerRedux from '@openreplay/tracker-redux';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
//...
|
//...
|
||||||
const store = createStore(
|
const store = createStore(
|
||||||
reducer,
|
reducer,
|
||||||
|
|
@ -35,8 +34,7 @@ const tracker = new OpenReplay({
|
||||||
//...
|
//...
|
||||||
function SomeFunctionalComponent() {
|
function SomeFunctionalComponent() {
|
||||||
useEffect(() => { // or componentDidMount in case of Class approach
|
useEffect(() => { // or componentDidMount in case of Class approach
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
//...
|
//...
|
||||||
const store = createStore(
|
const store = createStore(
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ import trackerVuex from '@openreplay/tracker-vuex';
|
||||||
const tracker = new OpenReplay({
|
const tracker = new OpenReplay({
|
||||||
projectKey: '${projectKey}'
|
projectKey: '${projectKey}'
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
//...
|
//...
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
//...
|
//...
|
||||||
|
|
@ -35,8 +34,7 @@ const tracker = new OpenReplay({
|
||||||
//...
|
//...
|
||||||
function SomeFunctionalComponent() {
|
function SomeFunctionalComponent() {
|
||||||
useEffect(() => { // or componentDidMount in case of Class approach
|
useEffect(() => { // or componentDidMount in case of Class approach
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, [])
|
}, [])
|
||||||
//...
|
//...
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ const tracker = new Tracker({
|
||||||
projectKey: "PROJECT_KEY",
|
projectKey: "PROJECT_KEY",
|
||||||
ingestPoint: "https://${window.location.hostname}/ingest",
|
ingestPoint: "https://${window.location.hostname}/ingest",
|
||||||
});
|
});
|
||||||
// .start() returns a promise
|
tracker.start()`;
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )`;
|
|
||||||
const usageCodeSST = `import Tracker from '@openreplay/tracker/cjs';
|
const usageCodeSST = `import Tracker from '@openreplay/tracker/cjs';
|
||||||
|
|
||||||
const tracker = new Tracker({
|
const tracker = new Tracker({
|
||||||
|
|
@ -23,8 +22,7 @@ const tracker = new Tracker({
|
||||||
|
|
||||||
function MyApp() {
|
function MyApp() {
|
||||||
useEffect(() => { // use componentDidMount in case of React Class Component
|
useEffect(() => { // use componentDidMount in case of React Class Component
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
//...
|
//...
|
||||||
|
|
@ -143,4 +141,4 @@ function InstallDocs({ site }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InstallDocs;
|
export default InstallDocs;
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@ const tracker = new Tracker({
|
||||||
ingestPoint: "https://${window.location.hostname}/ingest",
|
ingestPoint: "https://${window.location.hostname}/ingest",
|
||||||
});
|
});
|
||||||
|
|
||||||
// .start() returns a promise
|
tracker.start()`
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )`
|
|
||||||
const usageCodeSST = `import Tracker from '@openreplay/tracker/cjs';
|
const usageCodeSST = `import Tracker from '@openreplay/tracker/cjs';
|
||||||
|
|
||||||
const tracker = new Tracker({
|
const tracker = new Tracker({
|
||||||
|
|
@ -22,8 +21,7 @@ const tracker = new Tracker({
|
||||||
|
|
||||||
function MyApp() {
|
function MyApp() {
|
||||||
useEffect(() => { // use componentDidMount in case of React Class Component
|
useEffect(() => { // use componentDidMount in case of React Class Component
|
||||||
// .start() returns a promise
|
tracker.start()
|
||||||
tracker.start().then(sessionData => ... ).catch(e => ... )
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
//...
|
//...
|
||||||
|
|
@ -40,7 +38,7 @@ function InstallDocs({ site }) {
|
||||||
<div className={ cn(stl.snippetWrapper, '') }>
|
<div className={ cn(stl.snippetWrapper, '') }>
|
||||||
<CopyButton content={installationCommand} className={cn(stl.codeCopy, 'mt-2 mr-2')} />
|
<CopyButton content={installationCommand} className={cn(stl.codeCopy, 'mt-2 mr-2')} />
|
||||||
<CodeBlock code={installationCommand} language={'bash'} />
|
<CodeBlock code={installationCommand} language={'bash'} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -49,7 +47,7 @@ function InstallDocs({ site }) {
|
||||||
<div className={ cn(stl.snippetWrapper, '') }>
|
<div className={ cn(stl.snippetWrapper, '') }>
|
||||||
<CopyButton content={_usageCode} className={cn(stl.codeCopy, 'mt-2 mr-2')} />
|
<CopyButton content={_usageCode} className={cn(stl.codeCopy, 'mt-2 mr-2')} />
|
||||||
<CodeBlock code={_usageCode} language={'js'} />
|
<CodeBlock code={_usageCode} language={'js'} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-6">See <a href="https://docs.openreplay.com/en/sdk/" className="color-teal underline" target="_blank">Documentation</a> for the list of available options.</div>
|
<div className="mt-6">See <a href="https://docs.openreplay.com/en/sdk/" className="color-teal underline" target="_blank">Documentation</a> for the list of available options.</div>
|
||||||
|
|
@ -57,4 +55,4 @@ function InstallDocs({ site }) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InstallDocs
|
export default InstallDocs
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue