\`\`\`javascript
// WIX Customer Intelligence Agent (CIA) Tracking Script
// CIA Base URL: https://cjscottiii.pythonanywhere.com
const CIA_BASE_URL = "https://cjscottiii.pythonanywhere.com";
/**
* Generates a simple unique ID (UUID v4-like)
* @returns {string} A unique ID string
*/
function generateUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
/**
* Retrieves the customer ID from localStorage or creates a new one.
* @returns {string} The unique customer ID.
*/
function getOrCreateCustomerId() {
let customerId = localStorage.getItem('cia_customer_id');
if (!customerId) {
customerId = generateUUID();
localStorage.setItem('cia_customer_id', customerId);
console.log("CIA: New customer ID created:", customerId);
} else {
console.log("CIA: Existing customer ID retrieved:", customerId);
}
return customerId;
}
/**
* Sends a page view tracking event to the CIA backend.
* @param {string} customerId - The unique ID of the customer.
*/
function trackPageView(customerId) {
const trackUrl = \`\${CIA_BASE_URL}/api/v1/track\`;
const data = {
customer_id: customerId,
page_url: window.location.href,
event_type: 'page_view'
};
fetch(trackUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => {
console.log('CIA Tracking Success:', data);
})
.catch((error) => {
console.error('CIA Tracking Error:', error);
});
}
/**
* Fetches a personalized recommendation from the CIA backend.
* @param {string} customerId - The unique ID of the customer.
*/
function fetchRecommendation(customerId) {
const recommendationUrl = \`\${CIA_BASE_URL}/api/v1/recommendation/\${customerId}\`;
fetch(recommendationUrl)
.then(response => response.json())
.then(data => {
console.log('CIA Recommendation:', data.recommendation);
// This is the key output. In a future step, you will use Wix Velo/Corvid
// to capture this recommendation and display it to the user on the page.
// For now, check your browser's console (F12) to confirm it is working.
})
.catch((error) => {
console.error('CIA Recommendation Error:', error);
});
}
// Main execution block
(function() {
const customerId = getOrCreateCustomerId();
trackPageView(customerId);
fetchRecommendation(customerId);
})();
\`\`\`
top of page
Wed, Oct 16
| Delta Sport, Fitness & Nutrition, LLC
AS212° BOOTCAMP
EVERY Wednesdays 6pm and Saturdays 9am
This Bootcamp is progressive with 3 levels which all come with a Certificate of Completion. Everyone starts out at Force Level 1, then progressing to Force Level 2 and then the Final stage, AS212°!
Time & Location
Oct 16, 2019, 6:00 PM – Dec 18, 2020, 6:45 PM
Delta Sport, Fitness & Nutrition, LLC, 4151 McCoy Dr Suite 137, Aurora, IL 60504, USA
Tickets
Ticket typeAS212°Level 1: 6week ($20each)
This Bootcamp is progressive with 3 levels which all come with a Certificate of Completion. Everyone starts out at Force Level 1, then progressing.
Force Level 1: Will teach you how to move efficiently and effectively with a concentration on proper mechanics. This is great for beginners and those who are looking to challenge themselves with more core engagement and bodyweight movements.
Yoga Mat required.
Ticket typeAS212° Level2: 6week ($20each)
Force Level 2: Will add on to the components learned in Force Level 1, incorporating the body weight mechanics into flow. Focus will be placed on properly loading the body before movement. Yoga mat required.
Ticket typeAS212° Level 3: 6week($20each)
AS212°: Will be comprehensive of Force levels 1 and 2, adding Steel Mace flows, striking, and boxing basics.
This level is about taking it to the next level.
Ticket typeAS212° ALL 3 LEVELS ($18EACH)
Discounted price when you purchase ALL 3 Levels of the AS212° Bootcamp
18weeks of classes.