What you are trying to achieve is known Inline Plugin Installation.
Pre-requisite:
Before adding inline installation you must:
Publish your plugin on Chrome Webstore.
Must have your domain verified on Google Webmasters - Verified Site Requirement
Installation:
Then, to prompt the user to install the plugin while they are still on your site (not redirecting to Chrome Webstore) follow these steps:
Add a <Link />
to your Webstore Plugin, e.g.
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/itemID">
more details here.
Trigger the installation (say after the user clicks a button),
$('#install').on('click', function(){
if(window.chrome){
chrome.webstore.install(url, successCallback, failureCallback)
}
})
Make sure to checkout Official Documentation for more.