Validate your scripts installation
Technical Validation Guide - JOIN Stories Scripts Installation
Overview
This technical guide provides detailed validation procedures to ensure that all JOIN Stories scripts are correctly installed and functioning as expected on your website.
Prerequisites
Before starting validation, complete the installation guide.
1. Global Script Validation
1.1 Script Installation
The global script must be installed in the <head>
section of all pages:
<script src="https://{TEAM_ID}.my.join-stories.com/scripts/global.js" type="text/javascript"></script>
Team ID Configuration
Ensure that
{TEAM_ID}
in the script URL corresponds to your actual team ID.
1.2 Validation Process
Step 1: DOM Verification
- Open DevTools (F12)
- Navigate to the
Elements
tab - Search for the script tag in the
<head>
section - Verify the URL matches your configured domain
Step 2: Network Loading Verification
- Go to the
Network
tab in DevTools - Reload the page
- Search for the request to
global.js
- Verify HTTP status is
200 OK
Step 3: JavaScript Object Verification
- Open the DevTools Console
- Execute:
console.log(window.JoinStories)
- Verify the object is defined and contains necessary methods
1.3 Success Indicators
- ✅ Script tag present in
<head>
section - ✅
global.js
file loads successfully (200 OK status) - ✅
window.JoinStories
object is defined - ✅
JOIN_STORIES_READY
event is triggered (see Events documentation) - ✅ Automatic detection confirmed in JOIN Stories Studio Installation page
2. Checkout Tracking Validation
2.1 Implementation Method
Checkout tracking uses the window.JoinStories.sendCartValidated()
method. For detailed implementation, see Conversion Code documentation.
2.2 Validation Process
Step 1: Manual Test on Confirmation Page
- Complete a test purchase transaction
- Navigate to the confirmation/thank you page
- Open DevTools Console tab
- Verify absence of JavaScript errors
Step 2: Data Verification Test
Execute the following test in the DevTools Console:
// Test the conversion tracking function
window.JoinStories.sendCartValidated({
transaction_id: 'TEST-12345',
total_base_amount: 100.00,
total_final_amount: 85.00,
currency: 'EUR',
products: [{
product_id: 'PROD-001',
product_variant: 'RED-L',
product_price: 50.00,
product_base_price: 50.00,
product_final_price: 42.50,
product_quantity: 2,
currency: 'EUR'
}]
});
Step 3: Network Request Verification
- Open DevTools
Network
tab - Filter by XHR/Fetch requests
- Look for requests to JOIN Stories Analytics endpoints (
https://api.dev.stories.studio/meas/
) - Verify the payload structure matches the Conversion Code documentation
2.3 Success Indicators
- ✅
sendCartValidated
function executes without errors - ✅ Data is correctly formatted and sent
- ✅ Network request successfully reaches JOIN Stories endpoints
- ✅ Automatic detection confirmed in JOIN Stories Studio Installation page
3. Add to Cart Tracking Validation
3.1 Implementation Method
Add to cart tracking uses the window.JoinStories.sendProductAddToCart()
method. For detailed implementation, see Conversion Code documentation.
3.2 Validation Process
Step 1: Functional Test
- Navigate to a product page
- Click the "Add to cart" button
- Open DevTools Console tab
- Verify absence of JavaScript errors
Step 2: Data Verification Test
Execute the following test in the DevTools Console:
// Test the add to cart tracking function
window.JoinStories.sendProductAddToCart({
product_id: 'PROD-TEST',
product_variant: 'BLUE-M',
product_price: 29.99,
product_base_price: 34.99,
product_final_price: 29.99,
product_quantity: 1,
currency: 'EUR'
});
Step 3: Network Request Verification
- Open DevTools
Network
tab - Filter by XHR/Fetch requests
- Look for requests to JOIN Stories Analytics endpoints (
https://api.dev.stories.studio/meas/
) - Verify the payload structure matches the Conversion Code documentation
3.3 Success Indicators
- ✅
sendProductAddToCart
function executes without errors - ✅ Function triggers correctly when adding products to cart
- ✅ Product data is accurately transmitted
- ✅ Automatic detection confirmed in JOIN Stories Studio Installation page
4. Stories Add to Cart Validation
4.1 Technical Prerequisites
Required Integration Components:
- Add to cart callback configuration. See Add to cart : Plug stories add-to-cart to my website.
- Google Merchant Center connection on Studio
Stories Configuration Requirements:
- Products connected via Google Merchant Center
- Shopping interaction configured in Story builder
- CTA type configured in "Add to cart" mode
4.2 Validation Process
Step 1: Visual Functionality Test
- Open a Story containing products
- Verify the "Add to cart" button is visible
- Click the button
- Confirm the action executes correctly
Step 2: Technical Integration Test
- Open DevTools before interacting with the Story
- Click "Add to cart" button in the Story
- Monitor network calls in the Network tab
- Verify the product is effectively added to the site's cart
4.3 Success Indicators
- ✅ "Add to cart" button is visible in Stories
- ✅ Button click functions without JavaScript errors
- ✅ Product is successfully added to the website's cart
- ✅ Product data synchronization works correctly
5. Debugging and Troubleshooting
5.1 Debugging Console Commands
Check JOIN Stories Availability:
console.log('JOIN Stories available:', !!window.JoinStories);
Monitor Loading State:
document.addEventListener('JOIN_STORIES_READY', () => {
console.log('JOIN Stories ready and initialized!');
});
Listen to Analytics Events:
window.addEventListener('JOIN_ANALYTICS', (event) => {
console.log('JOIN Stories analytics event:', event);
});
5.2 Validation Checklist
Use this comprehensive checklist to verify your installation:
- Global script loads successfully and
window.JoinStories
is defined -
JOIN_STORIES_READY
event is triggered on page load - Checkout page:
sendCartValidated
function works correctly - Product pages:
sendProductAddToCart
function works correctly - Stories: "Add to cart" buttons are functional
- Automatic detection confirmed in JOIN Stories Studio Installation page
- No JavaScript errors appear in the console
- Network requests to JOIN Stories endpoints are successful
6. Common Issues and Solutions
6.1 Global Script Loading Issues
Symptoms: window.JoinStories
is undefined
Solutions:
- Verify the domain URL in the script tag
- Check network connectivity and firewall settings
- Review Content Security Policy (CSP) configurations
- Ensure script is placed in the
<head>
section
6.2 Conversion Tracking Issues
Symptoms: Checkout conversions are not recorded
Solutions:
- Verify script placement on the confirmation page
- Ensure data placeholders are replaced with actual values
- Validate product data structure matches documentation
- Check browser console for JavaScript errors
- Confirm the page URL matches your configured thank you page
6.3 Add to Cart Tracking Issues
Symptoms: Add to cart events are not tracked
Solutions:
- Verify script integration on product and cart pages
- Validate product data structure
- Check for JavaScript errors in the console
- Ensure the function is called after the global script loads
6.4 Stories Add to Cart Issues
Symptoms: Add to cart buttons in Stories don't work
Solutions:
- Verify Google Merchant Center connection in JOIN Stories Studio
- Confirm your Story includes a "Shopping" interaction module
- Check that CTA type is configured as "Add to cart"
- Ensure product IDs match between your site and Google Merchant Center
- Verify callback functions are properly implemented
7. Support and Resources
For additional assistance:
- Documentation: JOIN Stories Technical Documentation
- Installation Guide: Complete Setup Instructions
- Studio Dashboard: Installation Status Page
If issues persist after following this guide, contact JOIN Stories technical support with:
- Your team ID
- Specific error messages from the browser console
- Screenshots of the Network tab showing failed requests
- Details about your current implementation
Updated 6 days ago