nsdevaraj / gaforflash

Automatically exported from code.google.com/p/gaforflash
Apache License 2.0
1 stars 0 forks source link

'&' in page title is not URL encoded #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try to track a pageview on a page with '&' in the title
2.
3.

What is the expected output? What do you see instead?

ex: page title is "Mookie & Sam"
When trackPageview is called, utmdt value should be "Mookie & Sam", but
instead is "Sam ".

What version of the product are you using? On what operating system?
(Firefox 3 on OS X)

Please provide any additional information below.

Original issue reported on code.google.com by andyghatch on 24 Mar 2009 at 6:12

GoogleCodeExporter commented 9 years ago
This is also true for # sign in page title.
Everything after # will be discarded along with account number and event will 
not show 
in analytics at all.

Original comment by miroslav...@gmail.com on 17 Nov 2009 at 5:24

GoogleCodeExporter commented 9 years ago

Original comment by zwetan on 18 Nov 2009 at 10:07

GoogleCodeExporter commented 9 years ago
This same issue applies to trackEvent.

Original comment by kcraft%t...@gtempaccount.com on 8 Feb 2011 at 11:28

GoogleCodeExporter commented 9 years ago
Sorry for posting 2 comments, but I feel I should provide a little more detail:

trackEvent accepts 4 arguments: category, action, label, value. If any of these 
values contain ampersands, then the request to Google Analytics will go through 
but the event will never actually be tracked because the URL will not be parsed 
correctly. The arguments to trackEvent all need to be URL encoded.

Original comment by kcraft%t...@gtempaccount.com on 8 Feb 2011 at 11:32

GoogleCodeExporter commented 9 years ago
I have found the cause of this bug and am attaching a patch for it. Basically, 
when the ga _utm.gif url is being created the query sting values are encoded 
using the wrong action script function.

Original comment by ton...@gmail.com on 19 Apr 2012 at 7:45

Attachments:

GoogleCodeExporter commented 9 years ago
Turns out url encode is also hard coded off, here is the other patch that is 
needed to fix this. Note, we have also started a fork on github as we hack on 
this library for IGN. https://github.com/ign/gaforflash

Original comment by ton...@gmail.com on 24 Apr 2012 at 5:15

Attachments: