deploy google analytics to single html page not in root directory - html

I have created an html page specifically for facebook page and I need google analytics tracking for that page.
The page I have created is does not reside on root directory, instead the root directory is currently empty and I have added another folder for the html page. Now I have added the google anaytics code to the html file, but google anaytics reports
tracking not installed
How do I overcome this problem

You can ignore that message just go to the page and refresh a few times. Once data has been sent you will be fine.

So by looking at some of the answers in Google Analytics forum it looks like there a couple things that could be the problems.
Incorrect script, you can correct this by clicking "Edit" and then "Check status" to get proper UA and script
Time delay, apparently sometimes it takes up to 24 hours to see results of tracking
Change default home page under "Profile settings" and ensure that your homepage has a trailing "/"
http://www.google.com/support/forum/p/Google%20Analytics/thread?tid=5bd936ef9dcb807b&hl=en
http://www.google.com/support/forum/p/Google%20Analytics/thread?tid=60e0b7aa62ca25aa&hl=en
http://www.google.com/support/forum/p/Google%20Analytics/thread?tid=0bbbafc53f9bc417&hl=en

Related

How to properly debug WebApps deployed in google scripts?

I have some experience debugging with google app scripts, but I have encountered myself with this problem since I deployed my first WebApp and haven't been able to find a way to solve it.
The webapp can be accessed by anyone who has the link in order to fill a tiny form, and the information is saved on a google sheets file. The thing is, that after the form is filled out it should redirect you to "Page 1" or "Page 2" depending on one of the answers. The main problem is that when the user is redirected to "Page 1" there is no problem, but when the redirection is supposed to be made to "page 2" takes a lot of time and sometimes it just does not do it.
The thing is when I test the page as a common user with my google account logged in (the owner's account of the deployment) , I am able to see details about the errors on the app scripts panel, but when any other user enters the webApp I am not able to see further details about the errors on the app scripts panel. I have some code lines such as:
console.log('Entered 1st step successfully');
to keep track of my process, these logs are indeed registered when I use the WebApp with my google account logged in, but they are not made when the webApp is accessed by any other user, and there are some errors that I just haven´t been able to reproduce, thus corrected them.
Does anyone know how could I properly get the errors information when the users use the WebApp?
I attach an image of the google apps scripts panel which I am referring to.
App scripts panel view
Instead of console.log (which executed on the browser and routes the output to the user running the app), use the Logger class so they show up on the Execution Transcripts on the Google platform.
Hope this helps!

Can't log in to Google Apps Scripts

I'm using multiple Google accounts. In one of them (not default) I created Google Spreadsheet file and I want to create Script connected to it. Nothing complicated. But the problem is that after clicking Tools > Script Editor I'm being redirected to default user or I see this screen:
The same problem I have when trying to use: script.google.com
What can I do to enable Script editor?
I know you asked this 9 months ago, but here is my solution;
Sign out of all google accounts except the owner of the spreadsheet
You can now access the scripts and macros pages (go there)
Create a bookmark of them (this saves which profile is logged in)
Now sign back into all your profiles
Voila!
You will be able to access the scripts or macros via the bookmarks without getting the error page.
This is a reported bug.
Go give it a ☆ if you want to let Google know that this affects you.
You can consider appending authuser=email to the URL to open the script with a specific Google account.
For example, script.google.com...?param=value&authuser=email#example.com
I was not able to reproduce the problem. Perhaps it's a glitch or there is something wrong that requires some troubleshooting techniques that are off-topic on this site.
As a workaround, for the account having problems, use another Google Chrome profile, Incognito mode, or another browser.
By the other hand, it's possible that there isn't any wrong and it's just something related to your specific scenario.
From Sign in to multiple accounts at once
Sometimes settings might carry over
If you're signed in to multiple accounts at the same time, sometimes we can't tell which
account you're using. For example, if you're signed in to two accounts
and you open a new browser window, we aren't sure which account you
want to use. In cases like these, Google might apply settings from
your default account, like its Web & App Activity and Ads
Personalization settings.
google's default account (the first one you sign on with) has to be the owner of the sheet
Based on #iansedano's answer, you can share the file with the default chrome user and open the same link in a new tab again to resolve the issue.
If someone needs a quick fix for this :
At the end of the url change the "authuser=1" by the index of the Google Account you want to log with. (0 is the first one, 1 is the second)
https://i.stack.imgur.com/qJows.png
You can also open a new incognito window, paste your sheet url there (you'll need to authenticate). Then you can open Tools -> Script Editor

Cannot find a Google App Script I deployed as a web app

How can I find a Google App Script web app I deployed and modify it? It does not appear in my drive. Perhaps I didn't save it. Does it persist or disappear eventually? Is there somewhere that list all deployed web apps? If so, I have been unable to find it.
If your webapp is recent, simply replace "exec" at the end of the url with "edit" (without quotes) and you'll get the script editor opened on your script.
(Very old webapp have a different structure but it changed quite a long time ago so I guess you're not concerned with that.)
No. There is nothing like deployed webapps list. if u didn't save, u can't get it back even though you had deployed it. Make a try to open that script with the url available in your browser's history.

How to edit HTML in Google Drive?

I have hosted a HTML file created on my PC (along with a stylesheet) on Google Drive using the script described here.
I have given out the link and it seems to be working fine (no reported issues from those I've sent it to).
I have just discovered a minor omission from the file, I need to add another sentence. This should be ridiculously easy on a PC, I could just open it on notepad!
I can't find a way to edit it on Google Drive, the only connected apps are the viewer and Docs.
The viewer, as the name suggests, will only let me view the HTML, and the docs app won't let me save it back to the original file.
Obviously I could download it then upload again, but from experience it will probably give me a different URL.
Is there any way for me to do this while keeping the link the same, as I have already given the address out?
Currently you can't. You can only preview html files, that is preview the code or preview the rendered content, but you cannot natively edit the code. You have two options:
use a third party extension, such as Neutron Drive or Drive Notepad.
install the Google Drive Desktop App, edit your files locally and save. Changes will be uploaded automatically.
I have just used HTML Editey chrome app
You can do this through file revisions. Hopefully, Google adds another way, but using the revision feature works for me. To revise your file, click the check mark in the Google Drive file list, click more, and then click "Manage revisions...". In the box that pops up, click upload new revision and then you're set.
You may also be able to edit html files stored in google drive through other plugins, but I do not use any at this time to know of them.
Update!
go to drive right click your html file
choose "open with" then "connect more apps"
when app library pop up search for "notepad" then choose "drivenotepad"
after it connect to drive, select it, you will get code editor.

Google Picker shows just a blank page

I'm trying to develop javascript application which would allow user to select files from their Google drive,and then pass IDs of selected files to PHP backend and download them to my server.
For selecting files I'm using Google Picker, and I could use it normaly for a few days but suddenly It stopped to work. When i click and try to open Picker dialog, loadPicker() function pass without any error reported by firebug but i get only blank iframe. I have tested it on several computers with several various browsers, all with the same result
First I was thinking that I've put wrong API key, but every time I try to load picker that attempt is properly loged inGoogle API Console statistic pages, altrought every time i get just a blank screen. I have also tryed to make a new application an just copy/paste Google Picker hello world app source code from Google documentation, but I'm still getting just a blank page.
Any suggestions why this is happening? Is it possible that Google blocked Picker service for my account?
So as disscussed at google groups thread it was a bug on Google side, it should'nt happen anymore.
I've had that problem too, while the picker was working correctly few days ago. I found the reason : in the meantime i had to create a Service Account key for other purposes (access to Google Apps Script apis). Using the clientId of the Web Application Key was causing a picker window with title and buttons but "No files found" inside, while my folder parent Id didn't changed.... I replaced the clientId by the one of the Service Account key, and it solved the issue. Good intuition.
I recently had the same problem. I can't beleive I spent almost two hours trying to figure the issue. In case you've tried everything expect closing the developer tools, please do that.
The file picker won't show unless the developer tools is closed.