mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Minor adjustments
This commit is contained in:
parent
80754247a1
commit
56296ab88a
@ -22,10 +22,7 @@ export const THIRDPARTY_URLS = {
|
||||
twitter: "https://twitter.com/tobspr",
|
||||
privacyPolicy: "https://tobspr.io/privacy.html",
|
||||
|
||||
standaloneCampaignLink:
|
||||
G_IS_STANDALONE || true
|
||||
? "https://get.shapez.io/bundle/$campaign"
|
||||
: "https://get.shapez.io/$campaign",
|
||||
standaloneCampaignLink: "https://get.shapez.io/bundle/$campaign",
|
||||
puzzleDlcStorePage: "https://get.shapez.io/mm_puzzle_dlc?target=dlc",
|
||||
|
||||
levelTutorialVideos: {
|
||||
|
@ -5,6 +5,8 @@ export let queryParamOptions = {
|
||||
embedProvider: null,
|
||||
abtVariant: null,
|
||||
campaign: null,
|
||||
fbclid: null,
|
||||
gclid: null,
|
||||
};
|
||||
|
||||
if (options.embed) {
|
||||
@ -14,6 +16,14 @@ if (options.embed) {
|
||||
if (options.abtVariant) {
|
||||
queryParamOptions.abtVariant = options.abtVariant;
|
||||
}
|
||||
|
||||
if (options.fbclid) {
|
||||
queryParamOptions.fbclid = options.fbclid;
|
||||
}
|
||||
|
||||
if (options.gclid) {
|
||||
queryParamOptions.gclid = options.gclid;
|
||||
}
|
||||
if (options.utm_campaign) {
|
||||
queryParamOptions.campaign = options.utm_campaign;
|
||||
}
|
||||
|
@ -49,11 +49,7 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
|
||||
: ""
|
||||
}
|
||||
</button>
|
||||
${
|
||||
["1", "3"].includes(this.root.app.gameAnalytics.abtVariant)
|
||||
? `<span class="specialOffer">${T.global.discountSummerSale}</span>`
|
||||
: ""
|
||||
}
|
||||
${!G_IS_STEAM_DEMO ? `<span class="specialOffer">${T.global.discountSummerSale}</span>` : ""}
|
||||
<button class="otherCloseButton" data-btn-variant="${G_IS_STEAM_DEMO ? "steam-demo" : "prod"}">${
|
||||
T.ingame.standaloneAdvantages.no_thanks
|
||||
}</button>
|
||||
|
@ -36,8 +36,8 @@ const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.sha
|
||||
// Be sure to increment the ID whenever it changes
|
||||
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
|
||||
|
||||
const CURRENT_ABT = "abt_ssst";
|
||||
const CURRENT_ABT_COUNT = 4;
|
||||
const CURRENT_ABT = "abt_bsl2";
|
||||
const CURRENT_ABT_COUNT = 1;
|
||||
|
||||
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||
constructor(app) {
|
||||
|
@ -110,11 +110,7 @@ export class MainMenuState extends GameState {
|
||||
}
|
||||
Play shapez on Steam
|
||||
</a>
|
||||
${
|
||||
["1", "3"].includes(this.app.gameAnalytics.abtVariant)
|
||||
? `<span class="specialOffer">${T.global.discountSummerSale}</span>`
|
||||
: ""
|
||||
}
|
||||
${!G_IS_STEAM_DEMO ? `<span class="specialOffer">${T.global.discountSummerSale}</span>` : ""}
|
||||
${!G_IS_STEAM_DEMO ? `<div class="onlinePlayerCount"></div>` : ""}
|
||||
|
||||
`;
|
||||
|
@ -48,11 +48,7 @@ export class PreloadState extends GameState {
|
||||
|
||||
async fetchDiscounts() {
|
||||
// Summer sale specific
|
||||
const bundle = ["0", "1"].includes(this.app.gameAnalytics.abtVariant);
|
||||
globalConfig.currentDiscount = 60;
|
||||
THIRDPARTY_URLS.standaloneCampaignLink = bundle
|
||||
? "https://get.shapez.io/bundle/$campaign"
|
||||
: "https://get.shapez.io/$campaign";
|
||||
|
||||
// Regular
|
||||
// await timeoutPromise(
|
||||
@ -76,7 +72,12 @@ export class PreloadState extends GameState {
|
||||
return;
|
||||
}
|
||||
fetch(
|
||||
"https://analytics.shapez.io/campaign/" + queryParamOptions.campaign + "?lpurl=nocontent"
|
||||
"https://analytics.shapez.io/campaign/" +
|
||||
queryParamOptions.campaign +
|
||||
"?lpurl=nocontent&fbclid=" +
|
||||
queryParamOptions.fbclid +
|
||||
"&gclid=" +
|
||||
queryParamOptions.gclid
|
||||
).catch(err => {
|
||||
console.warn("Failed to send beacon:", err);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user