dli-iclinic / gaforflash

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

Module crashes when HTTP Referrer set #104

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a link pointing to the page with the tracked SWF so there's a 
referrer.
2. Load the module and call the trackEvent method on the module from the SWF

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

Organic.as :: match() throws an error:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
at com.google.analytics.core::Organic/match()
at com.google.analytics.campaign::CampaignManager/getOrganicCampaign()
at com.google.analytics.campaign::CampaignManager/getTrackerFromSearchString()
at com.google.analytics.campaign::CampaignManager/getCampaignInformation()
at com.google.analytics.v4::Tracker/_initData()
at com.google.analytics.v4::Tracker/trackEvent()

What version of the product are you using? On what operating system?

r480

Mac OS 10.8, tested in Chrome and Safari

Please provide any additional information below.

The error is easily fixed by changing the first line from

if ( name == "" )

to:

if ( !name )

Since null is passing through, then accessing name throws the error.

I did not dig into why this only happens in the HTTP Referrer case but it's a 
reliable repro for us. Our video player page loads and works correctly when 
accessed directly, but when a link was clicked by the user to get to the same 
page, this error is thrown every time. We used a plain link for testing, so the 
only difference to the browser is the fact that a referrer is present.

Original issue reported on code.google.com by mo...@animoto.com on 7 Sep 2012 at 6:46

GoogleCodeExporter commented 9 years ago
(I should note that this only occurred on Production but did not happen at our 
Staging server, which indicates that the error might not repro regularly in all 
server environments.)

Original comment by mo...@animoto.com on 7 Sep 2012 at 6:53