I have developed the Firefox extension. and want to redirect to user to my page on extension installation. use following code in background script :-
browser.runtime.onInstalled.addListener(function(details){
console.log(details):
chrome.tabs.create({
url : “https://xyz.com”
});
we want to open new tab where we will redirect the user to our page on extension installation. and track the extension installation. so how to find installation event.
Thanks
I want to track my extension installation. for tracking extension installation i will redirect user to my website thank you page after extension installed where will track that page. so I have used above code but that fail to redirect.
now i do not find any error or message on above code.
How to track the extension installation?
If that is the only reason, I think you should just send an XHR request. To do that (and maybe also to open a tab with your url) you probably need to add a host permission (something like "https://your.domin.tld/*") to the manifest.
now i do not find any error or message on above code.
How to track the extension installation?
Go to about:debugging and open the Add-on Debugger. Then reload the extension.