1

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");
    analyticsInteraction.setParams({
        hitType : 'event',
        eventCategory : 'Button',
        eventAction : 'click',
        eventLabel : 'Winter Campaign Button',
        eventValue: 200
    });
    analyticsInteraction.fire();
} 

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

0

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

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.