내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
해결됨

SPA Archetype w/ Automated adobeDataLayer?

Avatar

Level 1

One of the great benefits of using the AEM archetypes is that they're already setup at the component level to update the adobeDataLayer, but that doesn't seem to be the case when going through  the WKND SPA example.

 

Does anyone know if there is a convenient way to modify the setup to automatically populate the adobeDataLayer without having to re-write the sling model for all of the SPA components?

 

Thank you,

J

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

To populate page-level data attributes you could write Javascript that writes values into the DDL in yourcustomheaderlibs.html

Ex. https://github.com/adobe/aem-guides-wknd-spa/blob/React/integrate-spa-solution/ui.apps/src/main/cont...

 

In terms of component DDL, youd need to do this in your SPA app getting the data attributes you need from either OOTB values of your model.json or some other custom approach (depends on what all data you want).

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Administrator

@fmateen @Jörg_Hoh @Jagadeesh_Prakash @TarunKumar @Heidi05 @Mohit_KBansal @aanchal-sikka Can you please review this unanswered question? Appreciate your thoughts on this.



Kautuk Sahni

Avatar

정확한 답변 작성자:
Employee

To populate page-level data attributes you could write Javascript that writes values into the DDL in yourcustomheaderlibs.html

Ex. https://github.com/adobe/aem-guides-wknd-spa/blob/React/integrate-spa-solution/ui.apps/src/main/cont...

 

In terms of component DDL, youd need to do this in your SPA app getting the data attributes you need from either OOTB values of your model.json or some other custom approach (depends on what all data you want).