-
Notifications
You must be signed in to change notification settings - Fork 106
Description
The new nav is sending an event for Adobe Analytics to pick up when a top level item that's an <a> tag has been clicked.
This is an issue on developers.redhat.com which I think is the first site with analytics and links on the top level.
I gave this temporary workaround to the analytics team, which should be removed when we add a fix in this component:
https://gist.github.com/wesruv/ccaf91e1157f2a9e400ffa9d7069c2bb
The current pfe-shadow-dom-event listener only covers things in a dropdown, it could be added to a.pfe-navigation__menu-link on click as well, and I think that would fix the issue.
See: https://github.com/patternfly/patternfly-elements/blob/CPFED-3689-new-navigation-epic/elements/pfe-navigation/src/pfe-navigation.js#L1356
Impacted component(s)
- pfe-navigation from https://github.com/patternfly/patternfly-elements/tree/CPFED-3689-new-navigation-epic
Steps to reproduce
- Go to developers.redhat.com
- Open dev tools and in Console, check "preserve log"
- Add the following code via console:
document.addEventListener('pfe-shadow-dom-event', function(event) {
console.log(event);
debugger;
});- Click on a top level link, not dropdown, e.g. "Build"
- Add the code from my gist, try the same thing, and see the result