Trying to get Google Analytics working with Meteor framework is so much fun. It took me quite some after I got this wonderful view:
How to get there: that is the question which is answered in the following gist.
Create new template, so we can hook to Template.googleAnalytics.rendered function. So, when googleAnalytics template is rendered, we can call Google Analytics service.
Insert the template into the HTML page that should be reported to Google Analytics.
Implement the call to Google Analytics service as follows (just replace 'UA-111111-1' with your token).
Thanks to these two sources.
No comments:
Post a Comment