Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plausible-analytics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
varac-projects
plausible-analytics
Commits
4935a62b
Commit
4935a62b
authored
3 years ago
by
Uku Taht
Browse files
Options
Downloads
Patches
Plain Diff
Use JSON
parent
d1ef27ec
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/plausible/billing/plans.ex
+7
-72
7 additions, 72 deletions
lib/plausible/billing/plans.ex
priv/plans_v1.json
+72
-0
72 additions, 0 deletions
priv/plans_v1.json
priv/plans_v2.json
+72
-0
72 additions, 0 deletions
priv/plans_v2.json
with
151 additions
and
72 deletions
lib/plausible/billing/plans.ex
+
7
−
72
View file @
4935a62b
defmodule
Plausible
.
Billing
.
Plans
do
defmodule
Plausible
.
Billing
.
Plans
do
@plans_v1
[
@plans_v1
File
.
read!
(
Application
.
app_dir
(
:plausible
)
<>
"/priv/plans_v1.json"
)
%{
|>
Jason
.
decode!
(
keys:
:atoms
)
limit:
10_000
,
@plans_v2
File
.
read!
(
Application
.
app_dir
(
:plausible
)
<>
"/priv/plans_v2.json"
)
monthly_product_id:
"558018"
,
|>
Jason
.
decode!
(
keys:
:atoms
)
monthly_cost:
"$6"
,
yearly_product_id:
"572810"
,
yearly_cost:
"$48"
},
%{
limit:
100_000
,
monthly_product_id:
"558745"
,
monthly_cost:
"$12"
,
yearly_product_id:
"590752"
,
yearly_cost:
"$96"
},
%{
limit:
200_000
,
monthly_product_id:
"597485"
,
monthly_cost:
"$18"
,
yearly_product_id:
"597486"
,
yearly_cost:
"$144"
},
%{
limit:
500_000
,
monthly_product_id:
"597487"
,
monthly_cost:
"$27"
,
yearly_product_id:
"597488"
,
yearly_cost:
"$216"
},
%{
limit:
1_000_000
,
monthly_product_id:
"597642"
,
monthly_cost:
"$48"
,
yearly_product_id:
"597643"
,
yearly_cost:
"$384"
},
%{
limit:
2_000_000
,
monthly_product_id:
"597309"
,
monthly_cost:
"$69"
,
yearly_product_id:
"597310"
,
yearly_cost:
"$552"
},
%{
limit:
5_000_000
,
monthly_product_id:
"597311"
,
monthly_cost:
"$99"
,
yearly_product_id:
"597312"
,
yearly_cost:
"$792"
},
%{
limit:
10_000_000
,
monthly_product_id:
"642352"
,
monthly_cost:
"$150"
,
yearly_product_id:
"642354"
,
yearly_cost:
"$1200"
},
%{
limit:
20_000_000
,
monthly_product_id:
"642355"
,
monthly_cost:
"$225"
,
yearly_product_id:
"642356"
,
yearly_cost:
"$1800"
},
%{
limit:
50_000_000
,
monthly_product_id:
"650652"
,
monthly_cost:
"$330"
,
yearly_product_id:
"650653"
,
yearly_cost:
"$2640"
}
]
@unlisted_plans_v1
[
@unlisted_plans_v1
[
%{
limit:
150_000_000
,
yearly_product_id:
"648089"
,
yearly_cost:
"$4800"
}
%{
limit:
150_000_000
,
yearly_product_id:
"648089"
,
yearly_cost:
"$4800"
}
...
@@ -132,4 +64,7 @@ defmodule Plausible.Billing.Plans do
...
@@ -132,4 +64,7 @@ defmodule Plausible.Billing.Plans do
defp
number_format
(
num
)
do
defp
number_format
(
num
)
do
PlausibleWeb
.
StatsView
.
large_number_format
(
num
)
PlausibleWeb
.
StatsView
.
large_number_format
(
num
)
end
end
defp
plans_v1
()
do
end
end
end
This diff is collapsed.
Click to expand it.
priv/plans_v1.json
+
72
−
0
View file @
4935a62b
[
{
"limit"
:
10000
,
"monthly_cost"
:
"$6"
,
"monthly_product_id"
:
"558018"
,
"yearly_cost"
:
"$48"
,
"yearly_product_id"
:
"572810"
},
{
"limit"
:
100000
,
"monthly_cost"
:
"$12"
,
"monthly_product_id"
:
"558745"
,
"yearly_cost"
:
"$96"
,
"yearly_product_id"
:
"590752"
},
{
"limit"
:
200000
,
"monthly_cost"
:
"$18"
,
"monthly_product_id"
:
"597485"
,
"yearly_cost"
:
"$144"
,
"yearly_product_id"
:
"597486"
},
{
"limit"
:
500000
,
"monthly_cost"
:
"$27"
,
"monthly_product_id"
:
"597487"
,
"yearly_cost"
:
"$216"
,
"yearly_product_id"
:
"597488"
},
{
"limit"
:
1000000
,
"monthly_cost"
:
"$48"
,
"monthly_product_id"
:
"597642"
,
"yearly_cost"
:
"$384"
,
"yearly_product_id"
:
"597643"
},
{
"limit"
:
2000000
,
"monthly_cost"
:
"$69"
,
"monthly_product_id"
:
"597309"
,
"yearly_cost"
:
"$552"
,
"yearly_product_id"
:
"597310"
},
{
"limit"
:
5000000
,
"monthly_cost"
:
"$99"
,
"monthly_product_id"
:
"597311"
,
"yearly_cost"
:
"$792"
,
"yearly_product_id"
:
"597312"
},
{
"limit"
:
10000000
,
"monthly_cost"
:
"$150"
,
"monthly_product_id"
:
"642352"
,
"yearly_cost"
:
"$1200"
,
"yearly_product_id"
:
"642354"
},
{
"limit"
:
20000000
,
"monthly_cost"
:
"$225"
,
"monthly_product_id"
:
"642355"
,
"yearly_cost"
:
"$1800"
,
"yearly_product_id"
:
"642356"
},
{
"limit"
:
50000000
,
"monthly_cost"
:
"$330"
,
"monthly_product_id"
:
"650652"
,
"yearly_cost"
:
"$2640"
,
"yearly_product_id"
:
"650653"
}
]
This diff is collapsed.
Click to expand it.
priv/plans_v2.json
0 → 100644
+
72
−
0
View file @
4935a62b
[
{
"limit"
:
10000
,
"monthly_cost"
:
"$6"
,
"monthly_product_id"
:
"558018"
,
"yearly_cost"
:
"$60"
,
"yearly_product_id"
:
"653232"
},
{
"limit"
:
100000
,
"monthly_cost"
:
"$12"
,
"monthly_product_id"
:
"558745"
,
"yearly_cost"
:
"$120"
,
"yearly_product_id"
:
"653234"
},
{
"limit"
:
200000
,
"monthly_cost"
:
"$20"
,
"monthly_product_id"
:
"653237"
,
"yearly_cost"
:
"$200"
,
"yearly_product_id"
:
"653236"
},
{
"limit"
:
500000
,
"monthly_cost"
:
"$30"
,
"monthly_product_id"
:
"653238"
,
"yearly_cost"
:
"$300"
,
"yearly_product_id"
:
"653239"
},
{
"limit"
:
1000000
,
"monthly_cost"
:
"$50"
,
"monthly_product_id"
:
"597642"
,
"yearly_cost"
:
"$500"
,
"yearly_product_id"
:
"597643"
},
{
"limit"
:
2000000
,
"monthly_cost"
:
"$70"
,
"monthly_product_id"
:
"653253"
,
"yearly_cost"
:
"$700"
,
"yearly_product_id"
:
"653254"
},
{
"limit"
:
5000000
,
"monthly_cost"
:
"$100"
,
"monthly_product_id"
:
"653255"
,
"yearly_cost"
:
"$1000"
,
"yearly_product_id"
:
"653256"
},
{
"limit"
:
10000000
,
"monthly_cost"
:
"$150"
,
"monthly_product_id"
:
"642352"
,
"yearly_cost"
:
"$1500"
,
"yearly_product_id"
:
"653257"
},
{
"limit"
:
20000000
,
"monthly_cost"
:
"$225"
,
"monthly_product_id"
:
"642355"
,
"yearly_cost"
:
"$2250"
,
"yearly_product_id"
:
"653258"
},
{
"limit"
:
50000000
,
"monthly_cost"
:
"$330"
,
"monthly_product_id"
:
"650652"
,
"yearly_cost"
:
"$3300"
,
"yearly_product_id"
:
"653259"
}
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment