adobe / adobe/aem-spa-project-core

aem-spa-project-core + react sap - adobe analytics support

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
30
Forks
28
PR merge metrics
No merged PRs in 30d

Description

We are working on a new development using aem-spa-project-core with React frontend and would like to implement Adobe Analytics as described here: https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/data-layer/overview.html?lang=en

```

com.adobe.aem
spa.project.core.ui.apps
zip
${spa.project.core.version}


com.adobe.aem
spa.project.core.core
${spa.project.core.version}

```
We are also utilzing the SPA React libs:
```
"@adobe/aem-core-components-react-base": "^1.1.8",
"@adobe/aem-core-components-react-spa": "^1.2.0",
"@adobe/aem-react-editable-components": "^1.1.6",
"@adobe/aem-spa-component-mapping": "^1.1.1",
"@adobe/aem-spa-page-model-manager": "^1.3.11",
```

It seems that Adobe Analytics is not supported on SPA Core and SPA react libraries. There is nothing explicitly mentioned in documentation, and we would like some confirmation.

Note:
`/libs/core/wcm/components/page/v3/page/page.html` (HTL core page)
This has logic to include 'data-cmp-data-layer-enabled' on body tag, whereas:
`/apps/spa-project-core/components/page/page.html` (SPA core page)
does not have it.

Neither do any of the react core components output any of the following data tags on their respective markups:
```
data-cmp-data-layer
id
```

Looking at the react code for the Title component, There is no reference to anything related to Analytics data:
https://github.com/adobe/aem-react-core-wcm-components-base/blob/master/src/authoring/title/v2/TitleV2.tsx

Please advise:
1. Is Adobe Analytics supported for Core Components + SPA + React combination?
2. If not, is this something that is going to be supported?

Marking this as 'bug' and not 'feature request', due to the assumption that the page component should work at part between classical and spa versions.

Contributor guide

Open the contributing guide

Research direction

Start with the linked data-layer overview, then compare /libs/core/wcm/components/page/v3/page/page.html with /apps/spa-project-core/components/page/page.html and inspect the referenced TitleV2.tsx component. Establish whether the SPA React combination currently exposes the required data attributes and whether the issue needs documentation, maintainer confirmation, or a broader implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, react
Domain
analytics, frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.