okgrow / analytics

UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for Meteor
https://atmospherejs.com/okgrow/analytics
MIT License
213 stars 61 forks source link

Issue with Modal #174

Closed ycpatel813 closed 7 years ago

ycpatel813 commented 7 years ago

Hello, I found this is a very awesome module for Analytics. but I have a small issue in this. I am using a model on my website and now I want to track model page opened closed. so I have to add a manual page for an open model for that I have to use "autorun" : false. But this will stop looking my normal page view. so is it possible to use both simultaneously?

Thank you.

cfnelson commented 7 years ago

@ycpatel813 Yes, you can do both. You just need to call analytics.track() as mentioned in the Readme here. You can find more detailed instructions here.

All you need to do is call a analytics.track on your modal open & close events.

analytics.track("My Modal Opened", {
  eventName: "Modal Open",
  myCustomData: "Modal has been opened!",
});
analytics.track("My Modal Closed", {
  eventName: "Modal Closed",
  myCustomData: "Modal has been closed!",
});
ycpatel813 commented 7 years ago

@cfnelson You are 100% right using track I can easily do that but if i need to check average time of modal open is this possible using that? May be No. So I am creating virtual page for modal and set it. Exp: analytics.page('Virtual/modal/XYZ');

For use of analytics.page, I need to use "autorun" : false. This is not looking my normal page view. So i have opened this issue.

Hope you understand my problem. Thanks for valuable replay.