Meteor.startup(function() {
  $('html').attr('lang', 'pl');

  if (Meteor.isCordova) {
    document.addEventListener("backbutton", function() {
      if (window.location.pathname === '/') {
        window.plugins.Suspend.suspendApp();
      } else {
        window.history.back();
      }
    }, false);
  }
});

trackPageView = function(url) {
  _paq.push(['trackPageView', url || Router.current().url]);
};

trackEvent = function(cat, action, name) {
  _paq.push(['trackEvent', cat, action, name]);
};

@@ -335,72 +335,234 @@
 ion(
-url
 ) %7B%0A  
-_paq.push(%5B'trackPageView', url %7C%7C Router.current().url
+// XXX work around https://github.com/iron-meteor/iron-router/issues/1152%0A  const base = Meteor.absoluteUrl().slice(0, -1);%0A  const path = Router.current().url.replace(base, '');%0A  _paq.push(%5B'trackPageView', base + path
 %5D);%0A

fix page tracking urls