Skip to content
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

ga.js fails to send pre-existing events #269

Closed
dmitriyshashkin opened this issue Mar 25, 2016 · 3 comments · Fixed by #274
Closed

ga.js fails to send pre-existing events #269

dmitriyshashkin opened this issue Mar 25, 2016 · 3 comments · Fixed by #274
Assignees

Comments

@dmitriyshashkin
Copy link
Contributor

The is a code in ga.js that sends all events fired before enableAnalytics called. And it seems to be inconsistent with the current events implementation:

if (eventObj.eventType === BID_REQUESTED) {
  //bid is 1st args
  bid = args[0];
  sendBidRequestToGa(bid);
} 

So it expects args to be a list with numeric indices, yet here is the code from event.js that stores the fired events:

var eventPayload = args[0];

...

eventsFired.push({
  eventType: eventString,
  args: eventPayload,
  id: key
});

As the result "bid" in ga.js is undefined and sendBidRequestToGa function does nothing. If I change bid = args[0]; to bid = args; it works like a charm.

@protonate
Copy link
Collaborator

PR #274 contains this fix, thanks for reporting the bug.

@protonate protonate self-assigned this Mar 28, 2016
@protonate
Copy link
Collaborator

Reopening, will close with release of v0.8.0.

@protonate protonate reopened this Apr 8, 2016
@protonate
Copy link
Collaborator

Released with 0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants