Skip to content

Commit

Permalink
daa-ll not present when using footer-promo-tag in metadata.xlsx (#1970)
Browse files Browse the repository at this point in the history
process footer promo analytics
  • Loading branch information
vgoodric authored Mar 11, 2024
1 parent 621fd5f commit 31c4a53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/features/footer-promo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createTag, getConfig } from '../utils/utils.js';
import { decorateSectionAnalytics } from '../martech/attributes.js';

async function getPromoFromTaxonomy(contentRoot) {
const NAME_KEY = 'Name';
Expand All @@ -25,7 +26,8 @@ async function getPromoFromTaxonomy(contentRoot) {
}

export default async function initFooterPromo(footerPromoTag, footerPromoType) {
const { locale: { contentRoot } } = getConfig();
const config = getConfig();
const { locale: { contentRoot } } = config;
let href = footerPromoTag && `${contentRoot}/fragments/footer-promos/${footerPromoTag}`;

if (footerPromoType === 'taxonomy') {
Expand All @@ -42,4 +44,6 @@ export default async function initFooterPromo(footerPromoTag, footerPromoType) {
document.querySelector('main > div:last-of-type').insertAdjacentElement('afterend', section);
await loadFragment(a);
section.classList.add('section');
const sections = document.querySelectorAll('main > div');
decorateSectionAnalytics(section, sections.length - 1, config);
}

0 comments on commit 31c4a53

Please sign in to comment.