feature(dashboard): add conversion rate graph
This commit is contained in:
38
packages/db/test.ts
Normal file
38
packages/db/test.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { conversionService } from './src/services/conversion.service';
|
||||
// 68/37
|
||||
async function main() {
|
||||
const conversion = await conversionService.getConversion({
|
||||
projectId: 'kiddokitchen-app',
|
||||
startDate: '2025-02-01',
|
||||
endDate: '2025-03-01',
|
||||
funnelGroup: 'session_id',
|
||||
breakdowns: [
|
||||
{
|
||||
name: 'os',
|
||||
},
|
||||
],
|
||||
interval: 'day',
|
||||
events: [
|
||||
{
|
||||
segment: 'event',
|
||||
name: 'screen_view',
|
||||
filters: [
|
||||
{
|
||||
name: 'path',
|
||||
operator: 'is',
|
||||
value: ['Start'],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
segment: 'event',
|
||||
name: 'sign_up',
|
||||
filters: [],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
console.dir(conversion, { depth: null });
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user