@@ -157,4 +157,4 @@ function AndroidInstallDocs({site}: any) {
);
}
-export default AndroidInstallDocs
+export default AndroidInstallDocs;
diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx
index c2de52485..401a67ef0 100644
--- a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx
+++ b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx
@@ -25,14 +25,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// not required if you're using our SaaS version
- OpenReplay.shared.serverURL = "https://your.instance.com/ingest"
+ OpenReplay.shared.serverURL = "INGEST_POINT"
OpenReplay.shared.start(projectKey: "PROJECT_KEY", options: .defaults)
// ...
return true
}
// ...`;
-const configuration = `let crashs: Bool
+const configuration = `let crashes: Bool
let analytics: Bool
let performances: Bool
let logs: Bool
@@ -72,8 +72,8 @@ TextField("Input", text: $text)
// UIKit will use placeholder as label and sender.isSecureTextEntry to mask the input
Analytics.shared.addObservedInput(inputEl)`
-function MobileInstallDocs({ site }: any) {
- const _usageCode = usageCode.replace('PROJECT_KEY', site.projectKey);
+function MobileInstallDocs({ site, ingestPoint }: any) {
+ const _usageCode = usageCode.replace('INGEST_POINT', ingestPoint).replace('PROJECT_KEY', site.projectKey);
return (
diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/OnboardingMobileTabs.tsx b/frontend/app/components/Onboarding/components/OnboardingTabs/OnboardingMobileTabs.tsx
index abfb00f77..e88a8d95e 100644
--- a/frontend/app/components/Onboarding/components/OnboardingTabs/OnboardingMobileTabs.tsx
+++ b/frontend/app/components/Onboarding/components/OnboardingTabs/OnboardingMobileTabs.tsx
@@ -21,6 +21,7 @@ const MobileTrackingCodeModal = (props: Props) => {
const { site } = props;
const [activeTab, setActiveTab] = useState(iOS);
const { showModal } = useModal();
+ const ingestPoint = `https://${window.location.hostname}/ingest`;
const showUserModal = () => {
showModal(
, { right: true });
@@ -32,7 +33,7 @@ const MobileTrackingCodeModal = (props: Props) => {
return (
-
+
@@ -55,7 +56,7 @@ const MobileTrackingCodeModal = (props: Props) => {
return (
diff --git a/frontend/app/components/shared/TrackingCodeModal/InstallIosDocs.tsx b/frontend/app/components/shared/TrackingCodeModal/InstallIosDocs.tsx
index c39a70f5e..06965c8a5 100644
--- a/frontend/app/components/shared/TrackingCodeModal/InstallIosDocs.tsx
+++ b/frontend/app/components/shared/TrackingCodeModal/InstallIosDocs.tsx
@@ -7,12 +7,12 @@ import stl from './InstallDocs/installDocs.module.css'
import { usageCode as iosUsageCode, installationCommand as iosInstallCommand } from "../../Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs";
import { usageCode as androidUsageCode, installationCommand as androidInstallCommand } from "../../Onboarding/components/OnboardingTabs/InstallDocs/AndroidInstallDocs";
-function InstallMobileDocs({ site }) {
+function InstallMobileDocs({ site, ingestPoint }: any) {
const [isIos, setIsIos] = React.useState(true)
const usageCode = isIos ? iosUsageCode : androidUsageCode
const installationCommand = isIos ? iosInstallCommand : androidInstallCommand
- const _usageCode = usageCode.replace('PROJECT_KEY', site.projectKey)
+ const _usageCode = usageCode.replace('PROJECT_KEY', site.projectKey).replace('INGEST_POINT', ingestPoint)
const docLink = `https://docs.openreplay.com/en/${isIos ? 'ios-' : 'android-'}sdk/`
return (
@@ -54,4 +54,4 @@ function InstallMobileDocs({ site }) {
)
}
-export default InstallMobileDocs
\ No newline at end of file
+export default InstallMobileDocs
diff --git a/frontend/app/components/shared/TrackingCodeModal/TrackingCodeModal.js b/frontend/app/components/shared/TrackingCodeModal/TrackingCodeModal.js
index 3b7094293..3530e15c4 100644
--- a/frontend/app/components/shared/TrackingCodeModal/TrackingCodeModal.js
+++ b/frontend/app/components/shared/TrackingCodeModal/TrackingCodeModal.js
@@ -34,7 +34,8 @@ class TrackingCodeModal extends React.PureComponent {
render() {
const { title = '', subTitle, site } = this.props;
const { activeTab } = this.state;
- console.log(this.props.site);
+ const ingestPoint = `https://${window.location.hostname}/ingest`;
+
return (
-
+
) : (