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
JavaScript Code
// Kajabi Subscription Redirect Script
(function() {
'use strict';
// Configuration
var planConfig = {
"GET STARTED": "https://buy.stripe.com/4gM4gs0XG26I4rW4RM7N600",
"JOIN ELITE": "https://buy.stripe.com/00wdR25dW12E5w0bga7N602",
"LEGENDARY": "https://buy.stripe.com/eVqfZaaygdPq4rWfwq7N601"
};
// Function to add redirect functionality
function initRedirects() {
var allElements = document.body.getElementsByTagName('*');
var count = 0;
for (var i = 0; i < allElements.length; i++) {
var element = allElements[i];
// Skip script and style elements
if (element.tagName === 'SCRIPT' || element.tagName === 'STYLE') {
continue;
}
var text = (element.textContent || element.innerText).trim();
if (!text) continue;
for (var planName in planConfig) {
if (text.indexOf(planName) !== -1) {
// Make element clickable
element.style.cursor = 'pointer';
// Add click event - use event delegation to avoid issues
element.onclick = function(e) {
e.preventDefault();
e.stopPropagation();
window.location.href = planConfig[planName];
return false;
};
count++;
break;
}
}
}
if (count > 0) {
console.log('Kajabi redirect: Enhanced ' + count + ' elements');
}
}
// Initialize when page is loaded
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', function() {
setTimeout(initRedirects, 1500);
});
} else {
setTimeout(initRedirects, 1500);
}
})();
Note: This script will not modify your page layout. It only adds click functionality to elements containing "GET STARTED", "JOIN ELITE", or "LEGENDARY" text.
How It Works
The script will find 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.