mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
A/B test whether showing the price is good or not
This commit is contained in:
parent
8b7c0a91cd
commit
1c88b99de3
BIN
res/ui/get_on_steam_with_price.png
Normal file
BIN
res/ui/get_on_steam_with_price.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
@ -16,6 +16,7 @@
|
||||
grid-template-rows: #{D(40px)};
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lowerBar {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -57,10 +58,7 @@
|
||||
@include S(margin, 0);
|
||||
@include S(width, 180px);
|
||||
@include S(height, 40px);
|
||||
& {
|
||||
/* @load-async */
|
||||
background: #171a23 uiResource("get_on_steam.png") center center / contain no-repeat;
|
||||
}
|
||||
background: #171a23 center center / contain no-repeat;
|
||||
|
||||
@include S(border-radius, $globalBorderRadius);
|
||||
}
|
||||
|
@ -75,3 +75,17 @@ $languages: en, de, cs, da, et, es-419, fr, it, pt-BR, sv, tr, el, ru, uk, zh-TW
|
||||
background-image: uiResource("languages/#{$language}.svg") !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PRICE
|
||||
*/
|
||||
|
||||
.steam_1_pr {
|
||||
/* @load-async */
|
||||
background-image: uiResource("get_on_steam_with_price.png") !important;
|
||||
}
|
||||
|
||||
.steam_2_npr {
|
||||
/* @load-async */
|
||||
background-image: uiResource("get_on_steam.png") !important;
|
||||
}
|
||||
|
@ -133,10 +133,7 @@
|
||||
width: 100%;
|
||||
@include S(height, 40px);
|
||||
@include S(width, 180px);
|
||||
& {
|
||||
/* @load-async */
|
||||
background: #171a23 uiResource("get_on_steam.png") center center / contain no-repeat;
|
||||
}
|
||||
background: #171a23 center center / contain no-repeat;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
text-indent: -999em;
|
||||
|
@ -25,6 +25,8 @@ export const THIRDPARTY_URLS = {
|
||||
standaloneStorePage: "https://store.steampowered.com/app/1318690/shapezio/",
|
||||
};
|
||||
|
||||
export const A_B_TESTING_LINK_TYPE = Math.random() > 0.5 ? "steam_1_pr" : "steam_2_npr";
|
||||
|
||||
export const globalConfig = {
|
||||
// Size of a single tile in Pixels.
|
||||
// NOTICE: Update webpack.production.config too!
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { THIRDPARTY_URLS } from "../../../core/config";
|
||||
import { A_B_TESTING_LINK_TYPE, THIRDPARTY_URLS } from "../../../core/config";
|
||||
import { InputReceiver } from "../../../core/input_receiver";
|
||||
import { makeDiv } from "../../../core/utils";
|
||||
import { T } from "../../../translations";
|
||||
@ -33,16 +33,17 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
|
||||
</div>
|
||||
|
||||
<div class="lowerBar">
|
||||
<button class="steamLinkButton">
|
||||
<button class="steamLinkButton ${A_B_TESTING_LINK_TYPE}"></button>
|
||||
<button class="otherCloseButton">${T.ingame.standaloneAdvantages.no_thanks}</button>
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
);
|
||||
|
||||
this.trackClicks(this.contentDiv.querySelector("button.steamLinkButton"), () => {
|
||||
this.root.app.analytics.trackUiClick("standalone_advantage_visit_steam");
|
||||
this.root.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneStorePage + "?ref=savs");
|
||||
this.root.app.platformWrapper.openExternalLink(
|
||||
THIRDPARTY_URLS.standaloneStorePage + "?ref=savs&prc=" + A_B_TESTING_LINK_TYPE
|
||||
);
|
||||
this.close();
|
||||
});
|
||||
this.trackClicks(this.contentDiv.querySelector("button.otherCloseButton"), () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { GameState } from "../core/game_state";
|
||||
import { cachebust } from "../core/cachebust";
|
||||
import { globalConfig, IS_DEMO, THIRDPARTY_URLS } from "../core/config";
|
||||
import { A_B_TESTING_LINK_TYPE, globalConfig, IS_DEMO, THIRDPARTY_URLS } from "../core/config";
|
||||
import {
|
||||
makeDiv,
|
||||
makeButtonElement,
|
||||
@ -52,7 +52,7 @@ export class MainMenuState extends GameState {
|
||||
|
||||
<p>${T.demoBanners.intro}</p>
|
||||
|
||||
<a href="#" class="steamLink" target="_blank">Get the shapez.io standalone!</a>
|
||||
<a href="#" class="steamLink ${A_B_TESTING_LINK_TYPE}" target="_blank">Get the shapez.io standalone!</a>
|
||||
`;
|
||||
|
||||
return `
|
||||
@ -311,8 +311,11 @@ export class MainMenuState extends GameState {
|
||||
}
|
||||
|
||||
onSteamLinkClicked() {
|
||||
this.app.analytics.trackUiClick("main_menu_steam_link_2");
|
||||
this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneStorePage + "?ref=mmsl2");
|
||||
this.app.analytics.trackUiClick("main_menu_steam_link_" + A_B_TESTING_LINK_TYPE);
|
||||
this.app.platformWrapper.openExternalLink(
|
||||
THIRDPARTY_URLS.standaloneStorePage + "?ref=mmsl2&prc=" + A_B_TESTING_LINK_TYPE
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ demoBanners:
|
||||
# This is the "advertisement" shown in the main menu and other various places
|
||||
title: Demo Version
|
||||
intro: >-
|
||||
Get the standalone to unlock all features!
|
||||
Get the full game to unlock all features and content!
|
||||
|
||||
mainMenu:
|
||||
play: Play
|
||||
|
Loading…
Reference in New Issue
Block a user