How to trigger analyticsInteraction aura component from Lightning web components? Below is the code to trigger analyticsInteraction using aura component

var analyticsInteraction = $A.get("e.forceCommunity:analyticsInteraction");
        hitType : 'event',
        eventCategory : 'Button',
        eventAction : 'click',
        eventLabel : 'Winter Campaign Button',
        eventValue: 200

Can we do the same as above using Lightning web component?


As far as I know there is no equivalent for the analyticsInteraction. According to the document below are the supported events as of today.

This table maps standard Aura events, such as for navigating to a component or to display the record create panel, to usage in Lightning web components. Events that are not listed don’t currently have an equivalent in Lightning Web Components.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.