Skip to content

Commit

Permalink
Update common.libsonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
emre committed Apr 3, 2021
1 parent ba08962 commit 56bed24
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ local predefined = import 'predefined.jsonnet';
sql: '{{dimension.ltv_increase}}',
reportOptions: { formatNumbers: '$0,0' },
},
ltv_revenue_d7: {
label: 'D7 LTV',
category: 'Revenue',
sql: '{{measure.ltv_revenue_total}}/{{measure.all_users}}',
reportOptions: { formatNumbers: '$0,0' },
filters: [
{ dimension: 'days_since_signup', operator: 'equals', value: 7, valueType: 'integer' },
],
},
// ltv_revenue_d7: {
// label: 'D7 LTV',
// category: 'Revenue',
// sql: '{{measure.ltv_revenue_total}}/{{measure.all_users}}',
// reportOptions: { formatNumbers: '$0,0' },
// filters: [
// { dimension: 'days_since_signup', operator: 'equals', value: 7, valueType: 'integer' },
// ],
// },
whales_playing: {
aggregation: 'countUnique',
sql: '{{dimension.firebase_user_id}}',
Expand All @@ -104,7 +104,11 @@ local predefined = import 'predefined.jsonnet';
type: 'timestamp',
},
days_since_signup: {
sql: 'TIMESTAMP_DIFF({{dimension.user_first_touch}}, {{dimension.event_timestamp}})',
sql: 'TIMESTAMP_DIFF({{dimension.user_first_touch}}, {{dimension.event_timestamp}}, DAY)',
type: 'timestamp',
},
weeks_since_signup: {
sql: 'TIMESTAMP_DIFF({{dimension.user_first_touch}}, {{dimension.event_timestamp}}, WEEK)',
type: 'timestamp',
},
firebase_user_id: {
Expand Down

0 comments on commit 56bed24

Please sign in to comment.