Last active
August 29, 2015 14:26
-
-
Save poteto/f0d53ad8a23752aea549 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
metrics: inject.service(), | |
activate() { | |
this._trackPage(); | |
}, | |
_trackPage() { | |
run.scheduleOnce('afterRender', this, () => { | |
const page = document.location.href; | |
const title = this.routeName; | |
get(this, 'metrics').trackPage({ page, title }); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment