Created
June 26, 2017 20:11
-
-
Save MaksimAbramchuk/ebf16a4fab8438c42bc7387d85aa5fc9 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
const ua = require('universal-analytics'); | |
const bluebird = require('bluebird'); | |
const GOOGLE_ANALYTICS_ID = require('../../config').googleAnalytics.uid; | |
class GoogleAnalytics { | |
constructor(uid) { | |
this._uid = uid; | |
this._visitor = ua(GOOGLE_ANALYTICS_ID, this._uid, { strictCidFormat: false, }); | |
bluebird.promisifyAll(this._visitor); | |
} | |
} | |
module.exports = GoogleAnalytics; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment