0

Is it possible to Access Events triggered by Napili Template standard components (Lightning Community)?

I need to call forceCommunity_analyticsInteraction on onclick event for standard components on Napili Template. Many thanks

1

The available Events for communities are listed in the Lightning Communities Developer Guide:

Events

  • forceCommunity:analyticsInteraction
  • force:createRecord
  • force:editRecord
  • force:navigateToSObject
  • force:navigateToList
  • force:navigateToRelatedList
  • force:navigateToURL
  • force:navigateToObjectHome
  • lightning:openFiles
  • force:refreshView
  • forceCommunity:routeChange
  • forceCommunity:setActiveLanguage
  • force:showToast

additionally, you can refer to Lightning Component Developer Guide: Event Reference

Furthermore -

forceCommunity:analyticsInteraction

Tracks events triggered by custom components in Communities and sends the data to Google Analytics.

NOT for Standard component interaction.

If you want to achieve what I think you are trying to do, you are better off using a static resource to track your scoped clicks on standard components.

  • Many thanks for this info. I am a beginner developer in Salesforce and it helps a lot. BTW, just listened to SF live Webinar "Lightning Updates: Summer, Winter & Beyond" and they said Not to use "static resources" going forward, but to use SLDS instead. Sr-s will not be available starting winter 2018. – hksl Aug 29 '17 at 18:11
  • static resources can always be referenced in lightning components, with CSP and locker service, as long as your js files are strict mode compliant, this should not be an issue. SLDS is just a CSS framewok. – glls Aug 29 '17 at 18:16
  • Also, it looks like there is no events to catch for clicking on the tab of "Featured Topics & Feeds" component on Napili template (for example), correct? – hksl Aug 29 '17 at 19:20
  • How to call functions in static resource if there is no access to .cmp file of the standard components provided by SF? Or there is? I am a beginner Sf developer, what I m missing? Thank you – hksl Aug 30 '17 at 13:53

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.