-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't Actually Send Data #6
Comments
I am no more using this project, cc @contra I believe you are using it and it works right? Can you have a quick look at what @seanadkinson said? thx |
Here is my code, using my fork (https://github.com/contra/analytics.js-loader): loadAnalytics = require 'analytics.js-loader'
key = 'your segment key'
analytics = loadAnalytics key
if analytics?
console.log '[Analytics] Loaded'
module.exports = ->
loadAnalytics key
else
console.log '[Analytics] Failed to load'
module.exports = null |
@contra Can you do a PR if you have more fixes? Actually you are now owner of both the github and npm repo so you can do anything you want here:) |
@seanadkinson same problem here - its not actually working... |
@mmahalwy Try my code above... it has been working well for me. |
Are you guys saying the currently published module is not working at all? Would you mind submitting a patch, @seanadkinson ? |
I encountered the same issue, it does appear the currently published module doesn't work for the reasons that @seanadkinson outlined. His module works perfectly for me. Would be happy to see this integrated into the library. |
Modify load function to compensate for queueing (Fixes #6)
Thanks for merging @vvo! |
@vvo Oops, looks like I didn't tag the commit though. Mind adding the |
I think I published it |
Ah, so you did, just didn't see it in GitHub tags. Thanks! |
actually there's no real need to push tags when publishing on npm, this is just a convenience/consistency for users but no need |
npm doesnt care about the github tags |
I think this library doesn't actually do the right thing. Real issue being the goofy way Segment has done their JS. When the analytics script is loaded, it doesn't actually fix the initial
window.analytics
, it just replaces it, and the fact that this module exports a reference to the initial object, means that after the script is loaded, events aren't actually sent to Segment and tracked.I could be wrong, but that is what I was observing.
Here is the module I created to fix this issue:
The text was updated successfully, but these errors were encountered: