What are the different ways to track events in Composr?

  • By
  • Added
  • 15 views
Question What are the different ways to track events in Composr?
Answer Composr offers various methods for tracking events:
  • Inbuilt events: Automatically recorded for actions like form submissions, purchases, newsletter signups, etc.
  • Tempcode symbol: Use the {$LOG_STATS_EVENT,event} symbol within your templates to track events when the template is displayed.
  • JavaScript function: Employ the $cms.statsEventTrack JavaScript function to track events from within your JavaScript code.
  • HTML data attribute: Add data-click-stats-event-track="{ category: 'some event', nativeTracking: true }" to HTML elements. This method acts as a wrapper for the JavaScript function.
  • URL wrapping: Wrap URLs in links using the {$STATS_TRACK_URL,URL,event} symbol. This approach records events via a redirection script and doesn't rely on JavaScript.

The JavaScript and HTML data attribute methods can also be integrated with Google Analytics events.
Edited

Rating

Unrated