This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.
When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:
Hi, Joe
In GoogleAnalyticsScript.cs
private void SetupMainScript()
please change place function HasGALabelCookie that it was called before
script.Append("<script type=\"text/javascript\" src=\"" + overrideScriptUrl + "\" />\n"); otherwise an error HasGALabelCookie - undefined
implement this function such as:
private void SetupMainScript() { if (trackPageLoadTime) { SetupUpperPageLoadTrackingScript(); }
StringBuilder script = new StringBuilder();
script.Append("<script type=\"text/javascript\"> "); script.Append("\n"); script.Append("function HasGALabelCookie(labelTerm){"); script.Append("\n"); script.Append("var gaCookie = ' ' + document.cookie + \";\";"); script.Append("\n"); script.Append("return gaCookie.indexOf(labelTerm);"); script.Append("}"); script.Append(" </script>");
if (overrideScriptUrl.Length > 0) { script.Append("<script type=\"text/javascript\" src=\"" + overrideScriptUrl + "\" />\n"); } script.Append("<script type=\"text/javascript\"> "); script.Append("\n"); if(overrideScriptUrl.Length == 0) { script.Append("var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");"); script.Append("\n"); script.Append("document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));"); script.Append("\n"); }
script.Append(" </script>");
Page.ClientScript.RegisterStartupScript( this.GetType(), "ganalytics", script.ToString());
}
Best regards, Alexander
And more
Please change
private bool setAllowHashFalse = true;
to
private bool setAllowHashFalse = false;
and
script.Append(trackerName + "._setAllowHash(false);"); to
script.Append(trackerName + "._setAllowHash(true);");
I downloaded the update from SVN and installed it. Everything works correctly.
Thank you, Joe