I'd like to integrate an auto-login pop-up as the one displayed in https://www.lequipe.fr
It detects your session in the browser and asks you if you want to join with your Google Account.
How can I implement this in my website? ( I already have Google Sign in ) - is using the GAPI API?
It's Google One-tap sign-up, it can be integrated using their API, follow this guide to setup Google One Tap in your website.
When you have added the Oauth2 ClientID in Google console. You would just use something like :
<!DOCTYPE html>
<html>
<head>
<script src="https://accounts.google.com/gsi/client" async defer></script>
</head>
<body>
<div id="g_id_onload"
data-client_id="XXXXXXXXXXXX-bk2lj5rs6l4c6g23nmtsfdh66qhfu921.apps.googleusercontent.com"
data-login_uri="https://localhost:3000/login"
>
</div>
</body>
</html>
and you would get :
Related
I created a general public webapp that is published for anyone even anonymous. I included code for gtag.js and google tag manager and have an analytics enabled account.
Trying to verify everything works, I couldnt see any realtime active users on the analytics dashboard. I then entered the same webapp with Firefox and the active user appeared.
I did a last test of dumping the whole webapp as static html page served on my localhost and it works as expected both in Firefox and Chrome/Chromium.
So I guess something combining chrome + apps script iframes/postMessage/whatever boilerplate is messed up for Chrome family browsers.
I tried using the Chrome Extension Tag Assistant and confirm that there are events fired when on localhost but nothing when running from https://script.google.com/a/macros/... thing.
Any tips on how to troubleshoot this ?
ps: I am not interested in building an app for server-side built reports with the AnalyticsApps, but just to record the activity of users on my webapp.
ps2: Adblock is disabled
edit: here is a quick example that you may test on this url:
Check here:https://script.google.com/a/macros/safewebmed.com.br/s/AKfycbwGoFhpo5qekznUEn9z4Crt9BtFz0ubDsjK9sNlcJz0xTroscdU/exec?testga=true
index.gs
function doGet(e) {
if (e.parameter.testga) {
var template = HtmlService.createTemplateFromFile('src/html/testga');
var html = template.evaluate().setTitle('testga').setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
return html;
}
}
testga.html
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PM7KHPS');</script>
<!-- End Google Tag Manager -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-179509330-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-179509330-1');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
This reports correctly realtime user online with Firefox, but not with Chrome/Chromium.
It works for me on Chrome, try to refresh the page with cache cleaning or check if you have not enabled the Same site settings in browser setting.
I have been following this codelab to fit my purpose of adding a Google App Script html service page to home-screen on a mobile device:
https://codelabs.developers.google.com/codelabs/add-to-home-screen/#1
However I am not creating a Web Server for Chrome, is it possible to achieve this with the html service?
At the moment of editing the manifesto and republishing as web app it reverts any changes done to it. I have attempted to host my json manifesto on external sites and DevTools still cannot detect it.
My index.html from App Script.
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<link rel="manifest" href="https://api.myjson.com/bins/1gst5h">
</head>
<body>
Some HTML..
</body>
</html>
My Google App Script Web App is fully functional and can be accessed through a the /exec link, I want to implement it to mobile home-screen but I don't know if the manifesto is truly being edited as upon publishing it reverts any changes done to it.
Google Apps Scripts are published in iframes. Where is your manifesto located? In the Play store or in the App Script? If it is in the Apps Script it it is likely the the manifesto doesn't make it to the client.
So im trying to load a static google map img, but there is only the image icon showing. This is a given code from and examination so i can't find what seems to be the problem.
Here is the result:
And below is the code:
<html>
<head>
<title>Google Map karta LTU</title>
</head>
<body>
<img src="https://maps.google.com/maps/api/staticmap?center=65.61835,22.140&zoom=14&size=512x512&maptype=roadmap&markers=color:blue%7Clabel:L%7C65.61835,22.140&key=AIzaSyC7p1EldP9HoI1ziysd2BZ9vvqSNNt35Dk"
alt="Google Map"
style="width:505px" />
</body>
</html>
If you visit the site, you can see that the problem is written there:
The Google Maps API server rejected your request. This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/static_maps_backend?project=_
Activate your API and provide the key necessary for displaying static images.
I am trying to get all the notes on my website to get exported onto Google drive. I have a pop up window with a "Save to drive" button but I can't figure out what file this HTML needs to be converted to. Also not sure how to convert the HTML into the certain file that Google drive needs.
Based from this documentation, the button is configured with a few attributes in a div tag in the HTML markup. You need to include the necessary JavaScript resource below to add the Save to Drive button:
<!DOCTYPE html>
<html>
<head>
<title>Save to Drive Demo: Basic Page</title>
<link rel="canonical" href="http://www.example.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<div class="g-savetodrive"
data-src="//example.com/path/to/myfile.pdf"
data-filename="My Statement.pdf"
data-sitename="My Company Name">
</div>
</body>
</html>
Check the examples here.
I am trying to test Ooyala HTML5 Player using Google Chrome v45.0.2454.85 m. I signed in using a trial account of Ooyala and uploaded one video in the Backlot UI that has .mp4 extension.
There is one Basic HTML5 tutorial to view the Ooyala player. I followed that tutorial but I am getting the below error when I am trying to test the webpage:-
"Invalid Content Specified. Error #2048".
I am using Tomcat as local server on my machine.
Here is the code
<!DOCTYPE html>
<html>
<head>
<title>My Test Player V3 Web Page </title>
</head>
<body>
<script src='http://player.ooyala.com/v3/a163e2d9a4b6427e9baad33e86d94136'></script>
<div id='ooyalaplayer' style='width:640px;height:360px'></div>
<script>
OO.ready(function() {
OO.Player.create('ooyalaplayer', 'psOWwzeDqaYbIx19WKyhGMigX7uyg_yS');
});
</script>
<noscript>
<div>
Please enable Javascript to watch this video
</div>
</noscript>
</body>
</html>
Can anybody help to solve this?
Thanks.