I tried to analyse how google is transfering data. Especialy the document.referer.
for me its not ajax (firebug do not show any ajax activity).
PHP do not show the $_SERVER['HTTP_REFERER'] very reliable
Any idea?
Is there a uncompressed sourcecode of the ga.js in the world?
Use Javascript unpacker and beautifier for the unpack.
for me its not ajax (firebug do not show any ajax activity).
Just pay attention... look at the JS tab or Firebug.
You are adding http://www.google-analytics.com/ga.js in your page.
So, even before the page is loaded, googgle-analytics server already got a request sent to it :)
There is no need to use ajax.
And you can beautify ga.js using the tool Adnan has mentioned in his answer to see what the ga.js does after it is loaded
==== EDIT ====
Instead of including ga.js try using http://www.google-analytics.com/u/ga_debug.js
It is still minified and compressed, but it does have plenty of logging and debugging info
http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshooting.html#gaDebug
After the analytics file is downloaded, it runs and reads document.referer in Javascript, and then sends this information off to Google. You can see all the parameters it collects by looking at your browser's dev console - here's a picture from Google Chrome:
Related
How can I print .docx,doc,xls,csv in rails 4?
I tried window.open and window.print using javascript, but each time when it invokes window.open it downloads the file.
I tried to embed that in an iframe, that also fails.
Displaying a specific type of file isn't something that relies on your application it relies on the browser. In common browsers there is no support to display the file formats you mentioned.
What you can do is implementing some document viewers based on js if they are available for your usage. For example I know there is a plugin viewer.js that provides functionality to convert office and pdf to html. That might help you out... https://developers.box.com/viewer-js-tutorial/
I tried doing this some time back and this is the blog which i refereed. Helped a great deal.
Hope this helps.
I'm adding GA to a Rails 3 app, which would normally be extremely simple, of course. I've added the GA JS snippet, which is rendering just fine. Everything works perfectly in Safari. In Chrome, however, it's giving me a console error: Resource interpreted as Script but transferred with MIME type text/html: "about:blank", pointing to the JS line that loads the ga.js file: s.parentNode.insertBefore(ga, s). Some things I've investigated:
I created a plan HTML page with the JS snippet, and it loads outside Rails in Chrome with no error.
The same HTML page, when put in /public, gives the error above.
The same HTML page, loaded in Safari from /public, doesn't give any error according to Firebug.
I tried the GA Debug extension in Chrome, but it remains silent, because ga.js isn't getting loaded.
Looking at the developer console in Chrome, I see a request for "http://www.google-analytics.com/ga.js" that seems to stay in "pending" state, and a redirect to "about:blank" seemingly initiated by http://www.google-analytics.com/ga.js, which makes very little sense.
So this seems to be related to Rails (since the snippet works in the HTML outside Rails), and doesn't affect Safari, but other than that I'm stumped. Hopefully I've just been staring at it wrong, and someone else will point out the obvious to me...? Anyone come across this before? Any ideas will be very much appreciated.
Came across this issue myself. "Disconnect" disabled share buttons on my site (g+, twitter and fb). Had to remove it to view the site properly.
I have a local jQuery Mobile project going (inside PhoneGap, thus file:// protocol) where I sometimes need to fetch external pages (using http://) from a server where the content too are jQM pages with almost identical markup (except for the content, which is generated from a CMS).
Setting $.mobile.allowCrossDomainPages to true gives me the page, and that is all right. Going Back, however, fails. I get stuck in a place where /www/index.html is not found on the server (like, doh, of course..). Is there a way to "remember" where I came from, taking me back to the local html page I originally came from?
We just added a docs page on PhoneGap in jQuery Mobile for RC3 that should help you out quite a bit:
http://jquerymobile.com/test/docs/pages/phonegap.html
Here are the two urls: Working And Not Working
I cannot for the life of me figure out why I can get the simple version working but the other one is sending the data, receiving it and then not displaying the results.
I thought it was a css issue, but I've tried various methods to correct it and I haven't had any luck.
No javascript errors as well.
Not sure how much this helps, but a quick look reveals that on the test page you include this stylesheet:
http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css
But I cannot find a link to it on the 'not working' page.
My web page is not loading properly.How to debug this problem?Is there any addon on mozilla for this?
Depending on what you need to test you can get away with Firebug - for example XUL page without much XBL.
If you need to test some chrome JavaScript you might use Chromebug: http://getfirebug.com/releases/chromebug/
If Firebug nor Chromebug can help you can try JavaScript Debugger aka Venkman: https://addons.mozilla.org/en-US/firefox/addon/216/
Venkman is probably most powerful but not the friendliest one.
Also, if nothing else helps you can use alerts.
It is a static web page, or you have a backend with a specific language?
You can try use firebug to figure out the problems, but if you have an backend application, so you have to debug the app instead of the page.