GAForFlash bad error handling for allowScriptAccess = never

5 views
Skip to first unread message

ejm

unread,
Nov 26, 2008, 9:52:54 AM11/26/08
to GA Tracking For Adobe Flash
i get a runtime error when initializing GATracker when embedded on a
page that has allowScriptAccess=never

_tracker = new GATracker( displayReference, account, "AS3", false );

full error text below, but basically this code tries to detect the
domain of the page which will not work with script access
off. since this causes a runtime error in the constructor, all
subsequent tracking code will be broken.

googles documentation states that this should not break tracking all
together, just certain features:
"In either mode, allowscriptaccess must equal always in order for
campaign tracking to work. This parameter turns on read access to the
page's URL and referrer information required by the Flash tracking
code. Without allowscriptaccess, the Analytics tracking code degrades
gracefully. It still provides most user activity data, but will not
confirm to the Google Analytics campaign attribution model."

is this a bug on your side or are we doing something wrong? here is
the full error:



SecurityError: Error #2060: Security sandbox violation:
ExternalInterface caller
http://www.bitrub.com/[[IMPORT]]/flash.dev.iminlikewithyou.com/externalArcade.swf?initialUrl=arcade/gamelobby/tracism&origin=newgrounds&cache=2046064
cannot access http://www.bitrub.com/gatest/arcadeLoader_newgrounds_tracism_650.html.
at flash.external::ExternalInterface$/_initJS()
at flash.external::ExternalInterface$/call()
at com.google.analytics.external::JavascriptProxy/getProperty()[/
buRRRn/projects/GAforFlash/GA_FLASH/build/tmp/com/google/analytics/
external/JavascriptProxy.as:258]
at com.google.analytics.external::HTMLDOM/get protocol()[/buRRRn/
projects/GAforFlash/GA_FLASH/build/tmp/com/google/analytics/external/
HTMLDOM.as:269]
at com.google.analytics.utils::Environment/_findProtocol()[/buRRRn/
projects/GAforFlash/GA_FLASH/build/tmp/com/google/analytics/utils/
Environment.as:135]
at com.google.analytics.utils::Environment/get protocol()[/buRRRn/
projects/GAforFlash/GA_FLASH/build/tmp/com/google/analytics/utils/
Environment.as:435]
at com.google.analytics.utils::Environment/get domainName()[/buRRRn/
projects/GAforFlash/GA_FLASH/build/tmp/com/google/analytics/utils/
Environment.as:237]
at com.google.analytics.v4::Tracker/_updateDomainName()[/buRRRn/
projects/GAforFlash/GA_FLASH/build/tmp/com/google/analytics/v4/
Tracker.as:457]
at com.google.analytics.v4::Tracker/_initData()[/buRRRn/projects/
GAforFlash/GA_FLASH/build/tmp/com/google/analytics/v4/Tracker.as:118]
at com.google.analytics.v4::Tracker()[/buRRRn/projects/GAforFlash/
GA_FLASH/build/tmp/com/google/analytics/v4/Tracker.as:109]
at com.google.analytics::GATracker/_trackerFactory()[/buRRRn/projects/
GAforFlash/GA_FLASH/build/tmp/com/google/analytics/GATracker.as:215]
at com.google.analytics::GATracker/_factory()[/buRRRn/projects/
GAforFlash/GA_FLASH/build/tmp/com/google/analytics/GATracker.as:156]
at com.google.analytics::GATracker()[/buRRRn/projects/GAforFlash/
GA_FLASH/build/tmp/com/google/analytics/GATracker.as:124]
at iilwy.application::AnalyticsManager()[/Users/emablekos/Clients/
iilwy/repository_rev2/libraries/flash/FlashLibV2/src/iilwy/application/
AnalyticsManager.as:33]
at iilwy.versions.externalarcade::ExternalArcade/createApplication()[/
Users/emablekos/Clients/iilwy/repository_rev2/libraries/flash/
FlashLibV2/src/iilwy/versions/externalarcade/ExternalArcade.as:103]
at iilwy.application::AbstractApplication/onAddedToStage()[/Users/
emablekos/Clients/iilwy/repository_rev2/libraries/flash/FlashLibV2/src/
iilwy/application/AbstractApplication.as:27]
at flash.display::DisplayObjectContainer/addChild()
at externalArcade/onAddedToStage()[/Users/emablekos/Clients/iilwy/
repository_rev2/projects/FlashSite/projsrc/externalArcade.as:22]
ory_rev2/projects/FlashSite/projsrc/externalArcade.as:22]

Nick

unread,
Nov 26, 2008, 2:13:35 PM11/26/08
to GA Tracking For Adobe Flash
Hi,

You're doing everything fine....looks like a bug in the code.

I've started an issue here : http://code.google.com/p/gaforflash/issues/detail?id=20


On Nov 26, 6:52 am, ejm <emable...@gmail.com> wrote:
> i get a runtime error when initializing GATracker when embedded on a
> page that has allowScriptAccess=never
>
> _tracker = new GATracker( displayReference, account, "AS3", false );
>
> full error text below, but basically this code tries to detect the
> domain of the page which will not work with script access
> off. since this causes a runtime error in the constructor, all
> subsequent tracking code will be broken.
>
> googles documentation states that this should not break tracking all
> together, just certain features:
> "In either mode, allowscriptaccess must equal always in order for
> campaign tracking to work. This parameter turns on read access to the
> page's URL and referrer information required by the Flash tracking
> code. Without allowscriptaccess, the Analytics tracking code degrades
> gracefully. It still provides most user activity data, but will not
> confirm to the Google Analytics campaign attribution model."
>
> is this a bug on your side or are we doing something wrong? here is
> the full error:
>
> SecurityError: Error #2060: Security sandbox violation:
> ExternalInterface callerhttp://www.bitrub.com/[[IMPORT]]/flash.dev.iminlikewithyou.com/externalArcade.swf?initialUrl=arcade/gamelobby/tracism&origin=newgrounds&cache=2046064
> cannot accesshttp://www.bitrub.com/gatest/arcadeLoader_newgrounds_tracism_650.html.

ejm

unread,
Nov 26, 2008, 2:52:43 PM11/26/08
to GA Tracking For Adobe Flash
sweet!
Reply all
Reply to author
Forward
0 new messages