How to programmatically trigger an installation of Chrome browser extension from the link embedded into email message that our website sends to our users? We want to have as few steps as possible to provide a streamlined user experience. Our extension is hosted in a Chrome Web Store. Please help!
In your email message, include the link to the assisting webpage hosted in your website.
<link> tag with your own Extension ID - pls read in the HTML comments below:
<html> ... <head> ... <!-- Replace 'ejidjjhkpiempkbhmpbfngldlkglhimk' with your extension ID - you could find it in the browser address bar when navigated to your extension page in Chrome Web Store - it is a string of 32 Latin characters at the end of the URL in the address bar --> <!-- Do NOT just copy the browser URL - instead, copy the ID value from the URL in the address bar and paste the ID value into the LINK tag below --> <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/ejidjjhkpiempkbhmpbfngldlkglhimk"> ... </head> <body> ... <!-- for security reasons, the install() function below must ONLY be called as a result of explicit user action, like inside the 'onclick' event handler. It would not work otherwise --> <button onclick="chrome.webstore.install()" id="install-button"> Click to install %MyExtension% </button> ... </body> </html>
For security reasons, the website that hosts your Assisting Page must be verified via Webmaster Tools as being associated with that item in the Chrome Web Store, or the
install() function would not work.
For more information, like communicating between Chrome Extension and installation page, checking if extension is already installed, passing some specific parameters to the installed Extension, please go to this link:
FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.
Boost your productivity with FavScripts.com!