From 95cd48571edccc9de717c3af59290071c0730560 Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Fri, 13 Sep 2024 20:33:51 -0700 Subject: [PATCH] Improve ad security, add CMP changes (#2399) --- .../src/components/ui/PromotionWrapper.vue | 17 ++- apps/app-frontend/src/helpers/ads.js | 8 ++ apps/app/build.rs | 2 + apps/app/capabilities/ads.json | 3 +- apps/app/gen/schemas/acl-manifests.json | 2 +- apps/app/gen/schemas/capabilities.json | 2 +- apps/app/gen/schemas/desktop-schema.json | 28 ++++ apps/app/gen/schemas/macOS-schema.json | 28 ++++ apps/app/src/api/ads-init.js | 13 +- apps/app/src/api/ads.rs | 61 ++++++++- .../src/components/ui/AdPlaceholder.vue | 2 +- .../src/pages/dashboard/revenue/index.vue | 4 +- apps/frontend/src/pages/legal/cmp-info.vue | 78 ++++++++--- apps/frontend/src/public/promo-frame.html | 19 ++- packages/ui/src/components/base/Promotion.vue | 121 ------------------ packages/ui/src/components/index.ts | 1 - 16 files changed, 220 insertions(+), 169 deletions(-) delete mode 100644 packages/ui/src/components/base/Promotion.vue diff --git a/apps/app-frontend/src/components/ui/PromotionWrapper.vue b/apps/app-frontend/src/components/ui/PromotionWrapper.vue index 87a6d621..69b54065 100644 --- a/apps/app-frontend/src/components/ui/PromotionWrapper.vue +++ b/apps/app-frontend/src/components/ui/PromotionWrapper.vue @@ -4,7 +4,7 @@ import { get as getCreds } from '@/helpers/mr_auth.js' import { handleError } from '@/store/notifications.js' import { get_user } from '@/helpers/cache.js' import { ChevronRightIcon } from '@modrinth/assets' -import { init_ads_window } from '@/helpers/ads.js' +import { init_ads_window, open_ads_link, record_ads_click } from '@/helpers/ads.js' import { listen } from '@tauri-apps/api/event' const showAd = ref(true) @@ -73,6 +73,11 @@ function updateAdPosition(overrideShown = false) { } } +async function openPlusLink() { + await record_ads_click() + await open_ads_link('https://modrinth.com/plus', 'https://modrinth.com') +} + const unlisten = await listen('ads-scroll', (event) => { if (adsWrapper.value) { adsWrapper.value.parentNode.scrollTop += event.payload.scroll @@ -105,17 +110,17 @@ onUnmounted(() => { class="ad-parent relative mb-3 flex w-full justify-center rounded-2xl bg-bg-raised cursor-pointer" >
90% of ad revenue goes to creators
- 75% of ad revenue goes to creators + +90% of ad revenue goes to creators
+75% of ad revenue goes to creators
@@ -15,7 +15,7 @@
{{ $formatMoney(userBalance.available) }}, which is under the minimum of ${{ minWithdraw }} to withdraw.
{{ $formatMoney(userBalance.pending) }} of your balance is
- pending.
+
Last modified: May 13, 2024
+Last modified: Sep 12, 2024
This page was created for transparency for how the rewards program works on Modrinth. Feel free to join our Discord or email @@ -15,10 +15,11 @@
We collect ad revenue on our website and app through our ad network - Adrinth. We then distribute this ad revenue to creators. + Adrinth, which is powered by + Aditude. We then distribute this ad revenue to creators.
- The advertising revenue of the entire website and app is split 90% to creators and 10% to + The advertising revenue of the entire website and app is split 75% to creators and 25% to Modrinth.
@@ -42,10 +43,10 @@
In this scenario, the earnings for each creator and Modrinth would be as follows:
@@ -72,19 +73,62 @@
- Right now, you can use PayPal or Venmo to withdraw money from your Modrinth account. We are - working on more methods to withdraw money from your account. There are fees to withdraw money - from your Modrinth account—see the revenue page in your dashboard for more information. + Right now, you can use PayPal or Venmo to withdraw money from your Modrinth account. Gift card + withdrawal is also available. We are working on more methods to withdraw money from your + account. There are fees to withdraw money from your Modrinth account—see the revenue page in + your dashboard for more information.
-- While this is true, our new system (as of 08/05/23) gives more of the site's revenue to - creators, so creators will earn more. In the old system, we would earn revenue through - advertisements in search and user profile pages. This amounted on average each month to about - 15-20% of the site's total advertising revenue (so a 80-85% split to creators). The new system - gives creators more revenue and a more favorable split towards creators (90%). + Modrinth receives ad revenue from our ad providers on a NET 60 day basis. Due to this, not all + revenue is not immediately available to withdraw. We pay creators as soon as we receive the + money from our ad providers, which is 60 days after the last day of each month. This table + outlines some example dates of how NET 60 payments are made: +
+| Date | +Payment available date | +
|---|---|
| January 1st | +March 31st | +
| January 15th | +March 31st | +
| March 3rd | +May 30th | +
| June 30th | +August 29th | +
| July 14th | +September 29th | +
| October 12th | +December 30th | +
+ We aim to be as transparent as possible with creator revenue. All of our code is open source, + including our + + revenue distribution system . We also have an + API route that allows users + to query exact daily revenue for the site.
-