Skip to content

Commit

Permalink
Updated script and set prod and stage scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
davenichols-DHLS committed Oct 17, 2024
1 parent 98d46a3 commit 79640c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions scripts/scripts-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ export function moveInstrumentation(from, to) {

function loadEvergageScript() {
const script = document.createElement('script');
script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_staging/scripts/evergage.min.js';
script.onload = function() {
console.log('Evergage script loaded successfully.');
if (window.location.host === 'lifesciences.danaher.com') {
script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_prod/scripts/evergage.min.js';
} else {
script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_staging/scripts/evergage.min.js';
}
script.onload = function onEvergageLoad() {
};
script.onerror = function() {
console.error('Error loading Evergage script.');
script.onerror = function onEvergageError() {
};
document.head.appendChild(script);
}
Expand Down
Loading

0 comments on commit 79640c8

Please sign in to comment.