digitalpoint
Well-known member
Ya... new thread creation was already planned (and a few other things), I just haven't fully populated that settings page yet.@digitalpoint: This looks very nice so far!Can't wait to play around with it.
2 feature requests:
Thank you
- Could you also add the option to track new created threads?
- It also would be really cool, if it would be easy for other developer to extend the tracking of events for other content types. For example i'm trying for years to track comments and reviews from @Bob s AddOns (like AMS, RMS,...) in Google Analytics.
![]()
I needed to make the underlying tracking framework fairly modular already because there's some trickery it has to do when tracking when a user logs in.
Someone can either add normal gtag() events, but there are also times when you want to track something that happens but the action itself doesn't have a client-side page to give any JavaScript to run (for example if you do something and then it redirects the user to a page afterwards. In that case, it's setup to use the user's session. Anything can simply add an "analytics" object to the user's session, and the next page the user ends up on will log that event.
For example say you wanted to log a custom event, "new review" with no secondary parameters (the empty array at the end there is an array of parameters for the event):
PHP:
$session = $this->session();
$session->set('analytics', ['new_review', []]);
$session->save();
You could put that wherever was most appropriate (could be in an Entity that triggered only onInsert() or something.
If you have a template that is used after a new review is added, you could add the same thing with normal JavaScript like so:
Code:
<xf:js>gtag('event', 'new_review', []);</xf:js>