I\'m using Analytics in my Chrome extension. I want to execute the analytics code only if the extension is being used by a real person (not me while I\'m working on it). Are
Your production extension will have a single extension_id
that will not change while your unpacked extension will have a random extension_id
that will change if you remove and load it again. You can use the il8n API to get the extension_id
check if it matches the production extension_id
.
var extensionId = chrome.i18n.getMessage('@@extension_id');
You can install the Google Analytics opt-out https://chrome.google.com/webstore/detail/fllaojicojecljbmefodhfapmkghcbnh?hl=en