Skip to content

Commit 56296ab

Browse files
committed
Minor adjustments
1 parent 8075424 commit 56296ab

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

src/js/core/config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ export const THIRDPARTY_URLS = {
2222
twitter: "https://twitter.com/tobspr",
2323
privacyPolicy: "https://tobspr.io/privacy.html",
2424

25-
standaloneCampaignLink:
26-
G_IS_STANDALONE || true
27-
? "https://get.shapez.io/bundle/$campaign"
28-
: "https://get.shapez.io/$campaign",
25+
standaloneCampaignLink: "https://get.shapez.io/bundle/$campaign",
2926
puzzleDlcStorePage: "https://get.shapez.io/mm_puzzle_dlc?target=dlc",
3027

3128
levelTutorialVideos: {

src/js/core/query_parameters.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export let queryParamOptions = {
55
embedProvider: null,
66
abtVariant: null,
77
campaign: null,
8+
fbclid: null,
9+
gclid: null,
810
};
911

1012
if (options.embed) {
@@ -14,6 +16,14 @@ if (options.embed) {
1416
if (options.abtVariant) {
1517
queryParamOptions.abtVariant = options.abtVariant;
1618
}
19+
20+
if (options.fbclid) {
21+
queryParamOptions.fbclid = options.fbclid;
22+
}
23+
24+
if (options.gclid) {
25+
queryParamOptions.gclid = options.gclid;
26+
}
1727
if (options.utm_campaign) {
1828
queryParamOptions.campaign = options.utm_campaign;
1929
}

src/js/game/hud/parts/standalone_advantages.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
4949
: ""
5050
}
5151
</button>
52-
${
53-
["1", "3"].includes(this.root.app.gameAnalytics.abtVariant)
54-
? `<span class="specialOffer">${T.global.discountSummerSale}</span>`
55-
: ""
56-
}
52+
${!G_IS_STEAM_DEMO ? `<span class="specialOffer">${T.global.discountSummerSale}</span>` : ""}
5753
<button class="otherCloseButton" data-btn-variant="${G_IS_STEAM_DEMO ? "steam-demo" : "prod"}">${
5854
T.ingame.standaloneAdvantages.no_thanks
5955
}</button>

src/js/platform/browser/game_analytics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.sha
3636
// Be sure to increment the ID whenever it changes
3737
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
3838

39-
const CURRENT_ABT = "abt_ssst";
40-
const CURRENT_ABT_COUNT = 4;
39+
const CURRENT_ABT = "abt_bsl2";
40+
const CURRENT_ABT_COUNT = 1;
4141

4242
export class ShapezGameAnalytics extends GameAnalyticsInterface {
4343
constructor(app) {

src/js/states/main_menu.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ export class MainMenuState extends GameState {
110110
}
111111
Play shapez on Steam
112112
</a>
113-
${
114-
["1", "3"].includes(this.app.gameAnalytics.abtVariant)
115-
? `<span class="specialOffer">${T.global.discountSummerSale}</span>`
116-
: ""
117-
}
113+
${!G_IS_STEAM_DEMO ? `<span class="specialOffer">${T.global.discountSummerSale}</span>` : ""}
118114
${!G_IS_STEAM_DEMO ? `<div class="onlinePlayerCount"></div>` : ""}
119115
120116
`;

src/js/states/preload.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ export class PreloadState extends GameState {
4848

4949
async fetchDiscounts() {
5050
// Summer sale specific
51-
const bundle = ["0", "1"].includes(this.app.gameAnalytics.abtVariant);
5251
globalConfig.currentDiscount = 60;
53-
THIRDPARTY_URLS.standaloneCampaignLink = bundle
54-
? "https://get.shapez.io/bundle/$campaign"
55-
: "https://get.shapez.io/$campaign";
5652

5753
// Regular
5854
// await timeoutPromise(
@@ -76,7 +72,12 @@ export class PreloadState extends GameState {
7672
return;
7773
}
7874
fetch(
79-
"https://analytics.shapez.io/campaign/" + queryParamOptions.campaign + "?lpurl=nocontent"
75+
"https://analytics.shapez.io/campaign/" +
76+
queryParamOptions.campaign +
77+
"?lpurl=nocontent&fbclid=" +
78+
queryParamOptions.fbclid +
79+
"&gclid=" +
80+
queryParamOptions.gclid
8081
).catch(err => {
8182
console.warn("Failed to send beacon:", err);
8283
});

0 commit comments

Comments
 (0)