Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/settings-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class SettingsPage extends LitElement {
@state()
private archiveScreenshots = false;
@state()
private analyticsEnabled = false;
private analyticsEnabled = true;
@state()
private skipDomains = "";
@state()
Expand All @@ -90,8 +90,16 @@ export class SettingsPage extends LitElement {
this.archiveStorage = storage === "1";
const screenshots = await getLocalOption("archiveScreenshots");
this.archiveScreenshots = screenshots === "1";

const analytics = await getLocalOption("analyticsEnabled");
this.analyticsEnabled = analytics === "1";
if (analytics === null || analytics === undefined) {
// Set default analytics to enabled
await setLocalOption("analyticsEnabled", "1");
this.analyticsEnabled = true;
} else {
this.analyticsEnabled = analytics === "1";
}

const domains = await getLocalOption("skipDomains");

this.skipDomains = Array.isArray(domains)
Expand Down Expand Up @@ -239,7 +247,7 @@ export class SettingsPage extends LitElement {
></md-switch>
</label>
<p class="section-desc md-typescale-body-small">
Allow anonymous usage tracking (e.g., page archives, settings changes). When enabled, basic events will be logged. You can disable this at any time to opt-out of data collection.
Allow anonymous usage tracking. When enabled, basic information about app usage will be logged. You can disable this at any time to opt-out of data collection. Please see our website for a <a style="color: var(--md-sys-color-primary-container);" href="https://opfn.co/packrat#privacy-policy" target="_blank">complete list of the events we log</a>!
</p>
</div>

Expand Down