Implementation Instructions
- Copy the JavaScript code below
- In Kajabi, edit your page with subscription plans
- Add a Code Section element at the bottom of the page
- Paste the code into the code editor
- Save and publish your page
This script will not modify your existing page layout or styles. It only adds click event listeners to your subscription elements.
JavaScript Code to Copy
// Subscription Redirect Script for Kajabi
document.addEventListener('DOMContentLoaded', function() {
// Map of plan identifiers to Stripe URLs
const planUrls = {
"GET STARTED": "https://buy.stripe.com/4gM4gs0XG26I4rW4RM7N600",
"JOIN ELITE": "https://buy.stripe.com/00wdR25dW12E5w0bga7N602",
"LEGENDARY": "https://buy.stripe.com/eVqfZaaygdPq4rWfwq7N601"
};
// Function to find and enhance subscription elements
function enhanceSubscriptionElements() {
let elementsEnhanced = 0;
// Check all elements on the page
document.querySelectorAll('*').forEach(element => {
const elementText = element.textContent.trim();
// Check if element text matches any plan identifier
for (const [planName, url] of Object.entries(planUrls)) {
if (elementText.includes(planName)) {
// Make element clickable
element.style.cursor = 'pointer';
// Remove any existing click listeners to avoid duplicates
element.replaceWith(element.cloneNode(true));
const newElement = document.querySelector('[data-plan="' + planName + '"]') || element;
// Add click event listener
newElement.addEventListener('click', function() {
window.location.href = url;
});
// Add a subtle hover effect
newElement.addEventListener('mouseenter', function() {
this.style.opacity = '0.9';
this.style.transition = 'opacity 0.2s';
});
newElement.addEventListener('mouseleave', function() {
this.style.opacity = '1';
});
elementsEnhanced++;
break; // Stop checking other plans once a match is found
}
}
});
console.log('Subscription redirect script enhanced', elementsEnhanced, 'elements');
}
// Run the function after a short delay to ensure page is fully loaded
setTimeout(enhanceSubscriptionElements, 1000);
// Also run when new elements might be added (like with dynamic content)
const observer = new MutationObserver(enhanceSubscriptionElements);
observer.observe(document.body, { childList: true, subtree: true });
});
Note: This script will automatically find elements containing "GET STARTED", "JOIN ELITE", or "LEGENDARY" text and make them clickable, redirecting to the appropriate Stripe payment page.
How It Works
The script scans your page for elements containing these specific phrases:
- β "GET STARTED" - $8.88 plan
- β "JOIN ELITE" - $233.88 plan
- β "LEGENDARY" - $44.88 plan
When these elements are clicked, users will be redirected to the corresponding payment page.
Starter Plan
$8.88/month
Elite Plan
$233.88/month
Legendary Plan
$44.88/month