{"id":3599,"date":"2018-10-16T01:26:42","date_gmt":"2018-10-16T01:26:42","guid":{"rendered":"https:\/\/www.gmass.co\/blog\/?p=3599"},"modified":"2018-10-16T02:06:14","modified_gmt":"2018-10-16T02:06:14","slug":"redirect-user-to-website-after-installing-chrome-extension","status":"publish","type":"post","link":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/","title":{"rendered":"How to redirect the user to a website after installing a Chrome extension"},"content":{"rendered":"<p>If you&#8217;re the\u00a0<strong>developer of a Chrome extension<\/strong>, after a user installs your extension from the Chrome Web Store, you <strong>may want to redirect the user to a particular website<\/strong>. For example, if you make a Gmail extension, you may want to redirect the user to Gmail immediately after they install the extension so they can\u00a0begin using\u00a0it.<\/p>\n<h3>Why is this necessary?<\/h3>\n<p>Recently, <a href=\"https:\/\/venturebeat.com\/2018\/06\/12\/google-disables-inline-installation-for-chrome-extensions\/\">Google disabled inline installations<\/a> of Chrome extensions. When inline installation was allowed, developers of Chrome extensions like myself had more control over what happens when a user installed an extension from our website. From the GMass website, you could install the Chrome extension without\u00a0going to the Chrome Web Store, and then right after installation, I could redirect the user to gmail.com. It was an easy, seamlessess\u00a0experience.<\/p>\n<p>Now, however, since <a href=\"https:\/\/developer.chrome.com\/webstore\/inline_installation\">inline installation has been deprecated<\/a>, some creativity\u00a0is required to create that same seamless experience. Now, all Chrome extensions have to be installed from the <a href=\"https:\/\/chrome.google.com\/webstore\/category\/extensions\">Chrome Web Store<\/a>, and by default, when the extension is installed, nothing happens. The user remains on the Chrome Web Store. The user isn&#8217;t taken to the website that the extension applies to, in my case, Gmail, automatically.<\/p>\n<p>The developer has a <strong>couple of choices of how to redirect the user<\/strong> to the desired website, and in this article, I&#8217;ll discuss those options.<\/p>\n<h3>The super simple option to load Gmail after an extension install<\/h3>\n<p>If you&#8217;re developing a Chrome extension for Gmail, after the user installs the extension from the Chrome Web Store, you probably want the redirect the user to gmail.com. The easiest way to do this is to use the chrome.runtime.oninstall event in a background.js file, and <em>this is also how I do it for GMass<\/em>.<\/p>\n<p>Designate a background script in your <strong>manifest.json<\/strong> file, and this code will do the trick:<\/p>\n<pre>chrome.runtime.onInstalled.addListener(function() {\r\n  alert('You just made the best decision of today, by installing GMass!\\n\\nWe will now redirect you to your Gmail account so you can get started sending email campaigns inside Gmail.');\r\n\r\n<strong>  chrome.tabs.create({\r\n    url: 'https:\/\/mail.google.com',\r\n    active: true\r\n  });<\/strong>\r\n\r\n  return false;\r\n});<\/pre>\n<p>You can even throw in that JavaScript\u00a0<strong>alert<\/strong>, but that could also get annoying, so consider carefully before you do that.<\/p>\n<p>Notice that I&#8217;m using the <a href=\"https:\/\/developer.chrome.com\/extensions\/tabs\">chrome.tabs API<\/a> to create a new tab which will load Gmail and now the be the focused tab in the browser. I could have also used:<\/p>\n<pre>window.open(\"https:\/\/mail.google.com\");<\/pre>\n<p>&#8230;but doing so has a couple of disadvantages:<\/p>\n<ol>\n<li>window.open could be stopped by a popup blocker<\/li>\n<li>Depending on a user&#8217;s individual browser settings, this may open up a new window rather than a new tab in the existing window, which wouldn&#8217;t be as nice of a user experience<\/li>\n<\/ol>\n<p>Note that you don&#8217;t need to add any additional <a href=\"https:\/\/developer.chrome.com\/extensions\/declare_permissions\">&#8220;permissions&#8221;<\/a> to your manifest to do this. I&#8217;m always wary of adding &#8220;permissions&#8221; because\u00a0doing so <strong>forces a new warning message<\/strong> to pop up when a user&#8217;s browser updates your extension with the latest version.<\/p>\n<h3>A smarter option that detects what tabs\u00a0are already open<\/h3>\n<p>The super simple option works for most cases, but if you want to give your users a really slick experience,\u00a0it has a couple of flaws:<\/p>\n<ol>\n<li>If the user already has Gmail opened in a browser tab, it might annoy the user to now open up a\u00a0second tab with Gmail in it. And you want happy users, not annoyed users.<\/li>\n<li>Many people have multiple Gmail accounts and are logged into them at the same time. Gmail &#8220;numbers&#8221; the logged-in Gmail accounts and creates URLs to those accounts in the format of https:\/\/mail.google.com\/mail\/u\/<strong>0<\/strong>, https:\/\/mail.google.com\/mail\/u\/<strong>1<\/strong> and so on and so forth.\u00a0If a user has an existing tab open to\u00a0<strong>https:\/\/mail.google.com\/u\/1<\/strong>, and that&#8217;s the account he wishes to use with your extension, the super simple method will launch<strong> https:\/\/mail.google.com<\/strong> which will always redirect to <strong>https:\/\/mail.google.com\/u\/0<\/strong>, so now the user is\u00a0on\u00a0a different Gmail account than the one\u00a0on\u00a0which they\u00a0want to use\u00a0your extension.<\/li>\n<\/ol>\n<p>It would be\u00a0ideal to be able to <strong>detect if the user already has a Gmail browser tab open<\/strong>, and <strong>reload just that tab<\/strong> and bring the focus to it, or, if the user <strong>does\u00a0not already have a Gmail browser tab ope<\/strong>n, then <strong>open one for them<\/strong>, and just assume it&#8217;s the 0-numbered user they want to open. Of course the user can obviously navigate to any Gmail account he wishes.<\/p>\n<p><em>Note that regardless of how\u00a0the webpage is reloaded, reloading is <strong>necessary<\/strong> after the installation of a Chrome extension in order for it to run and appear as part of that webpage, whether it&#8217;s for Gmail or something else.<\/em><\/p>\n<p>One of my least favorite Chrome extensions is Mixmax. Perhaps I&#8217;ll dive into why I dislike\u00a0it so much in a future article, but I do bestow praise upon their developer for doing something smart. He wrote a routine in <strong>background.js<\/strong> that <strong>detects if any Gmail tabs are already open<\/strong>, and if so, the focus is brought to that tab, and the tab is reloaded. If not, a new tab is opened. This kind of seamless experience, however, comes at a cost.<\/p>\n<pre>chrome.runtime.onInstalled.addListener(function(details) {\r\n  if ((details.reason === 'install') || (details.reason === 'update')) \r\n  { \r\n<strong>    refreshBrowser('gmail-inbox', true);<\/strong> \r\n  } \r\n}); \r\n\r\nfunction refreshBrowser(target, bringToForeground) {\r\n  if (target !== 'gmail-inbox') return; \r\n  chrome.windows.getAll({ populate: true }, function(windows) \r\n  { \r\n    var foundExisting = false; \r\n    windows.forEach(function(win) \r\n    {\r\n      <strong>win.tabs.forEach(function(tab)<\/strong> \r\n      { \r\n        \/\/ Ignore tabs not matching the target. \r\n        if (target === 'gmail-inbox') { \r\n          if (!\/https:\\\/\\\/(mail|inbox)\\.google\\.com\/.test(tab.url)) return; \r\n        } \r\n        else \r\n        { \r\n          return; \/\/ Unknown target. \r\n        } \r\n        \/\/ Reload the matching tab. <strong> \r\n        chrome.tabs.reload(tab.id);<\/strong> \/\/ If this is the first one found, activate it. \r\n        if (bringToForeground &amp;&amp; !foundExisting) \r\n        {\r\n          <strong>chrome.tabs.update(tab.id, { active: true }); }<\/strong> \r\n          foundExisting = true; \r\n        }); \r\n      }); \r\n      \/\/ If no gmail tab found, just open a new one. \r\n      if (bringToForeground &amp;&amp; !foundExisting) \r\n      { \r\n        chrome.tabs.create({ url: (target === 'gmail-inbox') ? 'https:\/\/mail.google.com' : 'https:\/\/www.mixmax.com', active: true \r\n      });\r\n    } \r\n  });\r\n}\r\n<\/pre>\n<h3>Analyzing the code<\/h3>\n<p>Looking at the code, it <strong>loops through each tab in the window<\/strong>\u00a0checking if its URL is either <strong>mail.google.com<\/strong> or <strong>inbox.google.com<\/strong>. If so, then that tab is reloaded. If no tab is found with Gmail, then a tab is created and its focus is set.<\/p>\n<p><em>What is the cost that it comes with?<\/em> You must add the &#8220;tabs&#8221; permission to your <strong>manifest.json<\/strong>, and doing so triggers a warning that will scare off some users:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3609 \" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png\" alt=\"\" width=\"566\" height=\"283\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png 896w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web-300x150.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web-768x384.png 768w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/p>\n<p><em>Ouch.<\/em> In today&#8217;s age of privacy and security, that warning is enough to scare off most would-be new users. And in fact, that could be why their user installs have been dropping, according to <a href=\"http:\/\/www.chromecompete.com\">Chrome Compete<\/a>. Technically if you\u00a0<em>only<\/em> had the &#8220;tabs&#8221; permission declared in <strong>manifest.json<\/strong>, the warning would say: &#8220;Read your browsing history&#8221;, but in the case of Mixmax, they request a bunch of other permissions as well, and &#8220;Read and change all your data&#8230;&#8221; supersedes the &#8220;Read your browsing history&#8221; statement so that warning is used instead.<\/p>\n<p>The reason you have to add the &#8220;tabs&#8221; permission to manifest.json to begin with in this scenario but not the super simple scenario I&#8217;m using with GMass above is that is <a href=\"https:\/\/developer.chrome.com\/extensions\/tabs\">explained by Google<\/a>:<\/p>\n<blockquote><p>The majority of the\u00a0<code>chrome.tabs<\/code>\u00a0API can be used without declaring any permission. However, the\u00a0<code>\"tabs\"<\/code>permission is required in order to populate the\u00a0<code><a href=\"https:\/\/developer.chrome.com\/extensions\/tabs#property-Tab-url\">url<\/a><\/code>,\u00a0<code><a href=\"https:\/\/developer.chrome.com\/extensions\/tabs#property-Tab-title\">title<\/a><\/code>, and\u00a0<code><a href=\"https:\/\/developer.chrome.com\/extensions\/tabs#property-Tab-favIconUrl\">favIconUrl<\/a><\/code>\u00a0properties of\u00a0<code><a href=\"https:\/\/developer.chrome.com\/extensions\/tabs#type-Tab\">Tab<\/a><\/code>.<\/p><\/blockquote>\n<p>Meaning, if you want to read the URL of the tab, in order to detect that the user is already on a certain webpage, as the Mixmax example does, then you need\u00a0to request the &#8220;tabs&#8221; permission. But if you just want to create a tab, as I do in the super simple example, then you don&#8217;t need the &#8220;tabs&#8221; permission.<\/p>\n<p>To compare this is the warning you get when you install the GMass Chrome extension:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3614\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/GMass-Extension-Permissions-web.png\" alt=\"\" width=\"597\" height=\"272\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/GMass-Extension-Permissions-web.png 896w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/GMass-Extension-Permissions-web-300x137.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/GMass-Extension-Permissions-web-768x350.png 768w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><\/p>\n<p><em>See the difference?<\/em> Hopefully this warning is a lot less scarier than the prior one.<\/p>\n<p>One day I hope GMass ranks among the most popular Chrome extensions for Gmail, but for now, I have the utmost respect for the currently most popular Gmail Chrome extensions, including <a href=\"http:\/\/www.streak.com\">Streak<\/a>,\u00a0<a href=\"https:\/\/www.boomeranggmail.com\/\">Boomerang<\/a>, <a href=\"https:\/\/www.yesware.com\/\">Yesware<\/a>, <a href=\"https:\/\/gmelius.com\/\">Gmelius<\/a>, and <a href=\"https:\/\/www.sortd.com\/\">Sortd<\/a>. I often\u00a0examine\u00a0how these other Chrome extensions handle an issue when I&#8217;m trying to solve an issue of my own. In researching these other extensions for this article, I was curious how each of them handles the post-install experience for the user. Here are the results:<\/p>\n<ol>\n<li><strong>Boomerang:<\/strong> Creates a new tab that loads up a &#8220;welcome&#8221; page on their website, boomeranggmail.com, which then quickly redirects to gmail.com.<\/li>\n<li><strong>Yesware:<\/strong> doesn&#8217;t redirect the user at all after install<\/li>\n<li><strong>Gmelius:<\/strong> launches a new tab that loads gmail.com, regardless of what other tabs are open<\/li>\n<li><strong>Sortd:<\/strong> detects what tabs already have Gmail loaded and reloads just those, and therefore requires a stricter warning upon install, similar to Mixmax<\/li>\n<li><strong>Streak:<\/strong> doesn&#8217;t redirect the user at all after install<\/li>\n<\/ol>\n<h3>Summary<\/h3>\n<p>So to summarize, even though Google has deprecated inline installation for Chrome extensions, you can still control the experience of the user after they install an extension by redirecting them to the website of your choice. How sophisticated you want to get with that redirect, meaning whether you want to launch a new tab regardless of what tabs are already open, or whether you want to detect whether the website is already open, dictates which approach you take and what warnings the user sees when installing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re the\u00a0developer of a Chrome extension, after a user installs your extension from the Chrome Web Store, you may want to redirect the user to a particular\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3770,3462],"tags":[],"class_list":["post-3599","post","type-post","status-publish","format-standard","hentry","category-chrome-extensions","category-developers"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>How to redirect the user to a website after installing a Chrome extension<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to redirect the user to a website after installing a Chrome extension\" \/>\r\n<meta property=\"og:description\" content=\"If you&#8217;re the\u00a0developer of a Chrome extension, after a user installs your extension from the Chrome Web Store, you may want to redirect the user to a particular\u2026\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/\" \/>\r\n<meta property=\"og:site_name\" content=\"GMass Blog\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GmailMailMerge\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2018-10-16T01:26:42+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2018-10-16T02:06:14+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png\" \/>\r\n<meta name=\"author\" content=\"Ajay Goel\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@PartTimeSnob\" \/>\r\n<meta name=\"twitter:site\" content=\"@GMassForGmail\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay Goel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/\"},\"author\":{\"name\":\"Ajay Goel\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"headline\":\"How to redirect the user to a website after installing a Chrome extension\",\"datePublished\":\"2018-10-16T01:26:42+00:00\",\"dateModified\":\"2018-10-16T02:06:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/\"},\"wordCount\":1443,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Mixmax-Extension-Permissions-web.png\",\"articleSection\":[\"Chrome Extensions\",\"Developers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/\",\"name\":\"How to redirect the user to a website after installing a Chrome extension\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Mixmax-Extension-Permissions-web.png\",\"datePublished\":\"2018-10-16T01:26:42+00:00\",\"dateModified\":\"2018-10-16T02:06:14+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Mixmax-Extension-Permissions-web.png\",\"contentUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Mixmax-Extension-Permissions-web.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/redirect-user-to-website-after-installing-chrome-extension\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to redirect the user to a website after installing a Chrome extension\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\",\"name\":\"GMass Blog\",\"description\":\"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\",\"name\":\"Ajay Goel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"caption\":\"Ajay Goel\"},\"description\":\"Ajay is the founder of GMass and has been developing email sending software for 20 years.\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/PartTimeSnob\",\"https:\\\/\\\/x.com\\\/PartTimeSnob\"],\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/author\\\/ajay-goel\\\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to redirect the user to a website after installing a Chrome extension","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/","og_locale":"en_US","og_type":"article","og_title":"How to redirect the user to a website after installing a Chrome extension","og_description":"If you&#8217;re the\u00a0developer of a Chrome extension, after a user installs your extension from the Chrome Web Store, you may want to redirect the user to a particular\u2026","og_url":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/","og_site_name":"GMass Blog","article_publisher":"https:\/\/www.facebook.com\/GmailMailMerge\/","article_published_time":"2018-10-16T01:26:42+00:00","article_modified_time":"2018-10-16T02:06:14+00:00","og_image":[{"url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png","type":"","width":"","height":""}],"author":"Ajay Goel","twitter_card":"summary_large_image","twitter_creator":"@PartTimeSnob","twitter_site":"@GMassForGmail","twitter_misc":{"Written by":"Ajay Goel","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#article","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/"},"author":{"name":"Ajay Goel","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"headline":"How to redirect the user to a website after installing a Chrome extension","datePublished":"2018-10-16T01:26:42+00:00","dateModified":"2018-10-16T02:06:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/"},"wordCount":1443,"commentCount":2,"image":{"@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png","articleSection":["Chrome Extensions","Developers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/","url":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/","name":"How to redirect the user to a website after installing a Chrome extension","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#primaryimage"},"image":{"@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png","datePublished":"2018-10-16T01:26:42+00:00","dateModified":"2018-10-16T02:06:14+00:00","author":{"@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"breadcrumb":{"@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#primaryimage","url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png","contentUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2018\/10\/Mixmax-Extension-Permissions-web.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.gmass.co\/blog\/redirect-user-to-website-after-installing-chrome-extension\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gmass.co\/blog\/"},{"@type":"ListItem","position":2,"name":"How to redirect the user to a website after installing a Chrome extension"}]},{"@type":"WebSite","@id":"https:\/\/www.gmass.co\/blog\/#website","url":"https:\/\/www.gmass.co\/blog\/","name":"GMass Blog","description":"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gmass.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8","name":"Ajay Goel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","caption":"Ajay Goel"},"description":"Ajay is the founder of GMass and has been developing email sending software for 20 years.","sameAs":["https:\/\/twitter.com\/PartTimeSnob","https:\/\/x.com\/PartTimeSnob"],"url":"https:\/\/www.gmass.co\/blog\/author\/ajay-goel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/3599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/comments?post=3599"}],"version-history":[{"count":18,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/3599\/revisions"}],"predecessor-version":[{"id":3619,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/3599\/revisions\/3619"}],"wp:attachment":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media?parent=3599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/categories?post=3599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/tags?post=3599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}