Cross-Domain Usage Guide
Steps to Implement
1. Initialize Telemetry Web SDK on Domain A
// Get access token before navigation
const accessToken = await YofiTelemetry.getAppAccessToken();2. Pass the Access Token to Domain B
<a href="https://domain-b.com?accessToken=YOUR_ACCESS_TOKEN">Go to Domain B</a>3. Initialize Telemetry Web SDK on Domain B
// Extract access token from URL or other source
const urlParams = new URLSearchParams(window.location.search);
const accessToken = urlParams.get('accessToken');
// Initialize the SDK with the access token
YofiTelemetry.init({
publicToken: 'your-public-token',
journeyIdSalt: 'your-value'
accessToken: accessToken,
// Other initialization options
});Conclusion
Last updated
Was this helpful?