* Add admin overview page * Rename admin_portals spec * Fix admin nav bug * Add ahoy tracking to admin overview * Fix PR Feedback Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com> * Make decorative element more visible * Remove inline layout styles Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
20 lines
499 B
JavaScript
20 lines
499 B
JavaScript
import { Controller } from 'stimulus';
|
|
import ahoy from 'ahoy.js';
|
|
|
|
ahoy.configure({
|
|
cookies: false,
|
|
trackVisits: false,
|
|
});
|
|
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
export default class AhoyController extends Controller {
|
|
trackOverviewLink(event) {
|
|
event.preventDefault();
|
|
let properties = {
|
|
action: event.type,
|
|
target: event.target.toString(),
|
|
};
|
|
ahoy.track('Admin Overview Link Clicked', properties);
|
|
window.location.href = event.target.href;
|
|
}
|
|
}
|