Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing integration #504

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
<script src="/solutions/scripts/utils.js" type="module"></script>
<script src="/solutions/scripts/scripts.js" type="module"></script>
<link rel="stylesheet" href="/solutions/styles/styles.css"/>
<script src="https://assets.adobedtm.com/8a93f8486ba4/5492896ad67e/launch-b1f76be4d2ee.min.js" async></script>

26 changes: 13 additions & 13 deletions solutions/scripts/delayed.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// eslint-disable-next-line import/no-cycle
import {
loadScript,
// loadScript,
sampleRUM,
fetchPlaceholders,

Check failure on line 5 in solutions/scripts/delayed.js

View workflow job for this annotation

GitHub Actions / linting

'fetchPlaceholders' is defined but never used
getMetadata,
} from './lib-franklin.js';

// eslint-disable-next-line import/no-cycle
import {
getLanguageCountryFromPath,
// getLanguageCountryFromPath,
pushProductsToDataLayer,
pushToDataLayer,
getEnvironment,
// getEnvironment,
openUrlForOs,
} from './scripts.js';
import { loadBreadcrumbs } from './breadcrumbs.js';
Expand All @@ -20,21 +20,21 @@
// Core Web Vitals RUM collection
sampleRUM('cwv');

const LANGUAGE_COUNTRY = getLanguageCountryFromPath(window.location.pathname);
const LAUNCH_URL = 'https://assets.adobedtm.com';
const ENVIRONMENT = getEnvironment(window.location.hostname, LANGUAGE_COUNTRY.country);
// const LANGUAGE_COUNTRY = getLanguageCountryFromPath(window.location.pathname);
// const LAUNCH_URL = 'https://assets.adobedtm.com';
// const ENVIRONMENT = getEnvironment(window.location.hostname, LANGUAGE_COUNTRY.country);

// Load Adobe Experience platform data collection (Launch) script
const { launchProdScript, launchStageScript, launchDevScript } = await fetchPlaceholders();
// const { launchProdScript, launchStageScript, launchDevScript } = await fetchPlaceholders();

(async () => {
const ADOBE_MC_URL_ENV_MAP = new Map([
['prod', launchProdScript],
['stage', launchStageScript],
]);
// const ADOBE_MC_URL_ENV_MAP = new Map([
// ['prod', launchProdScript],
// ['stage', launchStageScript],
// ]);

const adobeMcScriptUrl = `${LAUNCH_URL}${ADOBE_MC_URL_ENV_MAP.get(ENVIRONMENT) || launchDevScript}`;
await loadScript(adobeMcScriptUrl);
// const adobeMcScriptUrl = `${LAUNCH_URL}${ADOBE_MC_URL_ENV_MAP.get(ENVIRONMENT) || launchDevScript}`;

Check failure on line 36 in solutions/scripts/delayed.js

View workflow job for this annotation

GitHub Actions / linting

This line has a length of 105. Maximum allowed is 100
// await loadScript(adobeMcScriptUrl);

onAdobeMcLoaded();
})();
Expand Down
Loading