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