Google map and Google Analytics on the same page, google map css, fonts are taking first place in the header - google-maps

Google Map and Google Analytics on the same page, here I need to display the analytics code as the first one but automatically google map Css taking the first place in the header. how could load the analytics as first one in the header section?
also, google captcha taking the second place, please help me to sort out this problem
FYR I have attached the screenshot :
https://imgur.com/a/ZgXPBiz

You don't need to bother too much about that. Google Analytics is loaded on the pages asynchronously, meaning that you can't determine the location in the HTML code served to the visitor.
Also, GA loading a couple of lines below the opening is more than good enough and doesn't pose a threat or a big difference in the performance of the tracking because of it.

Related

Inserting an iframe or Dynamic content into an info window?

I have a google map which is hooked up to a fusion table. Its pretty basic, lists street address, phone, and branch #.
I recently got a request though to add current weather to the info window that appears when a user clicks on a map marker.
Initially I thought I could just iframe this in, but it appears that google strips that HTML out of the info window when I add it in. I guess only basic html is allowed.
Does anyone know a way to throw dynamic content into that info window box or a way to get around google stripping out the iframe code?
The only iFrames I can get to work in fusion table map windows or cards are youtube embeds. Other iframes appear to get srtipped out as you say. It would be a good feature to be able to have universal iframe content instead of just google products.

How to create a secondary slide-out in Google Doc add on side bar in Google Apps Script

I have a Google Doc add-on that utilizes the sidebar: no problem there. When one uses the Google research add-on, there is an secondary slide out from the sidebar that shows a preview of a search result (see picture below) when clicked. I am hoping to replicate this behaviour, but I see nothing about it in the api regarding size and limits. I tried having a tooltip pop up on my links in the sidebar, but they appear cut off or under the main Google Doc palette. I have tried a bunch of other Google Doc add-ons to see if any of them replicate this functionality, but they don't. Before I spend hours on this, I want to first ask is anyone know if this is specific permission for Google's sidebar only, or can developers replicate this functionality?
The Research Tool is a direct integration with Docs and Presentations, it's not a Google Apps Script add-on. The freedom to "slide out" within the document is not available to add-ons today.
As one alternative, you could use an accordion affect to collapse your "first page" and overlay the result page, still within the bounds of the sidebar.
A second alternative would be to use a non-modal window, where you'd have more freedom. (resizing there requires client-server exchanges, but is doable)

Google PageSpeed abgc div id

I trying to pass Google PageSpeed Insights validation, but I have 1 issue, in User Experience section:
The tap target <div id="abgc"></div> is close to 1 other tap targets.
I searched my whole page, but I cannot find this code.
Finaly I realise that id abgc is google ad sense div class for arrow in top right box on ad. But maybe I'm wrong?
How to fix this?
There is no way to fix this - PSI oddly enough also counts Adsense and Analytics code as issues under "Leverage browser caching", "Minify JavaScript" and a couple others as well. Their code isn't cached or minified from their side unfortunately, and the CSS they use for some formats of their Adsense ads do create tap target niggles.
The end result is that getting 100/100 when you're using Adsense or Analytics is - for all intents and purposes - impossible until the wizards at Google exclude their own code from the criteria.

Google maps - current location - no HTML5

I am using google maps on a simple HTML website. I can center the map on user's current location using HTML5, but that requires getting permission from the user.
Now, when I go to maps.google.com, the map is centered around my location pretty accurately, without asking my permission.
How can I do that? When I define the map in my HTML webpage, I need to identify the center. How can I set the center to the center that google maps automatically finds?
Thanks.
assuming your in chrome go to the google maps page, then press f12 goto the resources tab, expand local storage, session storage and cookies, delete all entries from there, close the tab, go back to maps, notice it will no longer have your location, you'll need to click on the sniper type gps icon and it will ask you in you browser if you want to allow location.
answer being it has to ask you for permission, there is no compromise whether it's google or anyone else.
Your only other option, if you are serving any content server-side, would be to attempt to get the user's location from his or her IP address. There are a handful of APIs and services out there that will give you approximate locations, but your mileage may vary greatly. And, as I mentioned, you would have to execute that code server-side and then return some lat-long back to the client side to initialize/update your map.

Google Maps API v3 - how to save map into cookie/localstorage

I'm building a page which loads a google map, with street view on another div on the side and I would like to save that data so if the user closes his browser window and then comes back that it will bring it up again without the need to call the Google Map API again.
I've tried saving the div contents and replace it with the current one incase the user visited already.
I tried with cookies but couldn't save much information due for size limit of 4kb and I've tried localStorage (HTML5) but it didn't work as expected.
Any ideas?
Thanks