SempaiGames / haxe-ga

GoogleAnalytics Client API port to Haxe
Other
60 stars 23 forks source link

Fixed track event utme issue where utme was prefixed by "null" causing events not to track correctly #3

Closed phil-allcock closed 11 years ago

phil-allcock commented 11 years ago

Fixed tracking issue (on haxe 2.1 at least) where the utme was incorrectly built. The utme was built with null + event details. This prevented me from correctly updating sending analytics events event the correct event details were being included.

When/if this fix is merge could you please update the haxelib (2.1) so that the rest of the developers can get this fix. Thanks, Phil.

fbricker commented 11 years ago

Hi, I'm not sure how does the utme parameter works (as we ported the implementation from php-ga and just was there).

Are you sure we shouldn't do something like this instead to make sure we add eventFragment to utme if utme is not empty?:

if (eventFragment != null) { if(p.utme!=null) { p.utme += eventFragment; } else { p.utme = eventFragment; } }

Also, we have the same situation in: src/googleAnalytics/Internals/Request/PageviewRequest.hx - line 59 src/googleAnalytics/Internals/Request/EventRequest.hx - line 84 src/googleAnalytics/Internals/Request/Request.hx - line 262

If you're sure this change is correct, can you please change the other files also. I'll accept the push and update the library :)

Thankx! Federico

phil-allcock commented 11 years ago

Thanks for the reply. I have pushed my changes with the additional utme checks. These changes are now showing the correct analytics data in the account :)

Thanks, Phil

fbricker commented 11 years ago

Great! Thanks for your help. I'll repack and upgrade this asap.

Thanks again! Federico

phil-allcock commented 11 years ago

No problem. Thanks for putting into the haxe lib. Caused a bit of a headache yesterday when the events didn't track correctly. Glad I could help :)

Phil

phil-allcock commented 11 years ago

Hi Federico,

Is there any development on updating the haxe lib yet?

Phil

fbricker commented 11 years ago

Done! Sorry for the delay. I've published the new libs for haXe 2 and haXe 3.

Federico

phil-allcock commented 11 years ago

Thanks. Just tested it and it worked perfectly.

Phil