How to Redirect Users to Download Your App From the App Store

Kayla M.

Updated

Learn to add device-based app store redirection to a Kajabi Landing Page.


In this article:


Step 1. Create a New Landing Page

  • Log into your Kajabi Dashboard.
  • Navigate to Website.
  • Then, Landing Pages.
  • Click New Landing Page:

Kajabi_-__admin_sites_135263_landing_pages.png

  • Select a template
    Tip: a simple/blank template works best for redirect pages
  • Name your page and click Create.

Step 2. Design Your Landing Page

Tips for designing your landing page:

  • Keep the design minimal since users will be redirected quickly.
  • Add a simple heading (e.g., "Welcome")
  • Add a short message (e.g., "Preparing to redirect you to the appropriate destination...")

Learn to build a landing page.


Step 3. Add the Redirect Code

After designing your landing page, you will need to add the redirect code:

  • Click the Settings tab in the sidebar editor.
  • Select Custom Code:

Kajabi_-__admin_themes_2155770095_settings_edit.png

  • Locate the Custom Javascript section:

Kajabi_-__admin_themes_2155770095_settings_edit.png

  • Copy and paste the following code block and replacing the URLs with your own:
// Wait for the page to load
document.addEventListener('DOMContentLoaded', function() {
    // Detect device
    const userAgent = navigator.userAgent || navigator.vendor || window.opera;
    
    // Set up the redirects
    if (/iPhone|iPad|iPod/i.test(userAgent) && !window.MSStream) {
        // iOS device
        window.location.href = "https://apps.apple.com/gb/app/kajabi-branded-app/id6502643192";
    } else if (/android/i.test(userAgent)) {
        // Android device
        window.location.href = "https://play.google.com/store/apps/details?id=com.kj2148083404.app&hl=en_US";
    } else {
        // Desktop or other devices
        window.location.href = "https://kajabi.com/features/branded-app";
    }
});
Note:
The example code above is built into this landing page and has the working code above, check it out here.

Step 4. Save and Publish

  • Now you can click Save to keep and apply your changes.
  • Then, click Publish to make your page live.

Now, this landing page link could be used behind a call to action like "Download my app" and it will redirect to the appropriate app store for app downloads.


And that's how you can redirect your users to download your app from their app store based on their device. Please vote below and let us know if you found this article helpful. We value your feedback. Thanks for being the best part of Kajabi!

Did you find this article helpful?

Need more help?

Contact Us