-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Analytics] Unify client analytics (#2224)
Co-authored-by: ikethirdweb <[email protected]>
- Loading branch information
1 parent
771bd1e
commit 3ba1536
Showing
34 changed files
with
1,450 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@thirdweb-dev/unity-js-bridge": patch | ||
"@thirdweb-dev/react-native": patch | ||
"@thirdweb-dev/storage": patch | ||
"@thirdweb-dev/wallets": patch | ||
"@thirdweb-dev/react": patch | ||
"@thirdweb-dev/sdk": patch | ||
--- | ||
|
||
Adds correct reporing headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@thirdweb-dev/unity-js-bridge": patch | ||
"@thirdweb-dev/react-native": patch | ||
"@thirdweb-dev/react": patch | ||
--- | ||
|
||
Adds global sdk vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
import { isGlobalThisPresent } from "./evm/utils/global"; | ||
import { appBundleId } from "./evm/utils/version"; | ||
|
||
export * from "./evm"; | ||
|
||
if (isGlobalThisPresent()) { | ||
(globalThis as any).APP_BUNDLE_ID = appBundleId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import packageJson from "../../../package.json"; | ||
import { detectOS } from "./isMobile"; | ||
|
||
export function getAnalyticsGlobals() { | ||
if (typeof globalThis === "undefined") { | ||
return { | ||
x_sdk_name: packageJson.name, | ||
x_sdk_platform: "browser", | ||
x_sdk_version: packageJson.version, | ||
x_sdk_os: detectOS(), | ||
app_bundle_id: undefined, | ||
}; | ||
} | ||
|
||
if ((globalThis as any).X_SDK_NAME === undefined) { | ||
(globalThis as any).X_SDK_NAME = packageJson.name; | ||
(globalThis as any).X_SDK_PLATFORM = "browser"; | ||
(globalThis as any).X_SDK_VERSION = packageJson.version; | ||
(globalThis as any).X_SDK_OS = detectOS(); | ||
(globalThis as any).APP_BUNDLE_ID = undefined; | ||
} | ||
|
||
return { | ||
x_sdk_name: (globalThis as any).X_SDK_NAME, | ||
x_sdk_platform: (globalThis as any).X_SDK_PLATFORM, | ||
x_sdk_version: (globalThis as any).X_SDK_VERSION, | ||
x_sdk_os: (globalThis as any).X_SDK_OS, | ||
app_bundle_id: (globalThis as any).APP_BUNDLE_ID, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.