miguelzakharia / aurelia-google-analytics

An Aurelia.io plugin that adds Google Analytics page tracking to your project.
MIT License
29 stars 23 forks source link

SyntaxError #16

Closed nathanchase closed 7 years ago

nathanchase commented 7 years ago

I'm getting this error:

Uncaught SyntaxError: Invalid or unexpected token
    at ae.q.Analytics.ae.init (main.js:1)
    at main.js:6
    at Object.q.configure (main.js:6)
    at main.js:6
    at tryCatcher (main.js:1)
    at q._settlePromiseFromHandler (main.js:1)
    at q._settlePromise (main.js:1)
    at q._settlePromise0 (main.js:1)
    at q._settlePromises (main.js:1)
    at main.js:1
    at MutationObserver.<anonymous> (main.js:1)

I'm thinking it might be a polyfill issue, but I figured I'd post it here in case there was something internal to the plugin that could be changed.

miguelzakharia commented 7 years ago

In which browser are you experiencing this issue? I've never seen this before so I would need some more information in order to help you debug.

nathanchase commented 7 years ago

I pinpointed the issue. I had been using Babili instead of UglifyJS for minification/compression and it seemed to be causing this error to pop up. Once I switched back to UglifyJS, the error went away. It is most likely something to do with how Babili is mangling the variable names or otherwise somehow adversely impacting the code in aurelia-google-analytics from functioning properly.

miguelzakharia commented 7 years ago

Cool, I'm glad you found the fix!