Skip to content

Commit

Permalink
Add PDP events (#68)
Browse files Browse the repository at this point in the history
* Add PDP events

* update PDP scripts

* Upgrade to PDP w/ ACDL support

* lint

* Remove sourcemaps

* Remove sourcemaps

* upgrade PDP & tools versions

* upgrade PDP version | productId type change

* PDP version upgrade

* ACDL: updated pricing obj in PDP dropin

* removed modulepreload

---------

Co-authored-by: Mark J. Becker <[email protected]>
  • Loading branch information
alandana and herzog31 authored Jun 28, 2024
1 parent 7302e01 commit 52f17c9
Show file tree
Hide file tree
Showing 249 changed files with 2,511 additions and 150 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ helix-importer-ui
.DS_Store
*.bak
.idea
# Ignore .map files in scripts/__dropins__/ directory and all its subdirectories
scripts/__dropins__/**/*.map
12 changes: 1 addition & 11 deletions blocks/product-details/product-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,6 @@ export default async function decorate(block) {
setJsonLdProduct(product);
setMetaTags(product);
document.title = product.name;

window.adobeDataLayer.push((dl) => {
dl.push({
productContext: {
productId: parseInt(product.externalId, 10) || 0,
...product,
},
});
// TODO: Remove eventInfo once collector is updated
dl.push({ event: 'product-page-view', eventInfo: { ...dl.getState() } });
});
}, { eager: true });

// Render Containers
Expand Down Expand Up @@ -260,6 +249,7 @@ export default async function decorate(block) {
});
},
},
useACDL: true,
})(block);
} catch (e) {
console.error(e);

Check warning on line 255 in blocks/product-details/product-details.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
Expand Down
3 changes: 1 addition & 2 deletions head.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
<link rel="modulepreload" href="/scripts/__dropins__/tools/event-bus.js" />
<link rel="modulepreload" href="/scripts/__dropins__/tools/fetch-graphql.js" />
<link rel="modulepreload" href="/scripts/__dropins__/tools/initializer.js" />
<link rel="modulepreload" href="/scripts/__dropins__/tools/runtime.js" />

<link rel="stylesheet" href="/styles/styles.css" />

<link rel="preconnect" href="https://catalog-service-sandbox.adobe.io" crossorigin="" />
<link rel="preconnect" href="https://catalog-service.adobe.io" crossorigin="" />
<link rel="preconnect" href="https://catalog-service.adobe.io" crossorigin="" />
Loading

0 comments on commit 52f17c9

Please sign in to comment.