Skip to content

Commit

Permalink
remove platform from telemetry, add site specific selections like act…
Browse files Browse the repository at this point in the history
…ive feature, browser, filtered specs - but only on load
  • Loading branch information
shalanah committed Mar 26, 2024
1 parent bacf911 commit ce8f426
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const FAQ = [
],
[
'Do you track me?',
'iOS404 uses TelemetryDeck. TelemetryDeck does not collect any personally identifiable information. This helps to understand how our users are using the website and how we can improve it. iOS404 sends a best guess on country, device type (phone/tablet/desktop), vendor (Apple/Google). You can read more about [TelemetryDeck’s privacy policy](https://telemetrydeck.com/privacy)',
'iOS404 uses TelemetryDeck. TelemetryDeck does not collect any personally identifiable information. iOS404 sends a best guess on country and device type (phone|tablet|desktop) and on load sends which site feature and filters are active. This helps to understand how our users are using the website and how we can improve it. You can read more about [TelemetryDeck’s privacy policy](https://telemetrydeck.com/privacy)',
],
['', 'Copyright 2024. All Rights Reserved - Shalanah Dawson'],
];
Expand Down
12 changes: 8 additions & 4 deletions src/hooks/useTelemetryDeck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect } from 'react';
import TelemetryDeck from '@telemetrydeck/sdk';
import Bowser from 'bowser';
import { getCountry } from '../utils/getCountryFromTz';
import { hash } from 'three/examples/jsm/nodes/Nodes.js';

const getRandomIdentifier = () => {
return (
Expand All @@ -12,7 +13,7 @@ const getRandomIdentifier = () => {
};
const appID = process.env.NEXT_PUBLIC_TELEMETRY_DECK_APP_ID!;
const isLocal = process.env.NEXT_PUBLIC_ENV === 'local';
const signalForLocal = false; // for testing purposes - turn on locally to test signals
const signalForLocal = true; // for testing purposes - turn on locally to test signals
const td = new TelemetryDeck({
appID: appID,
clientUser: 'anonymous',
Expand Down Expand Up @@ -49,12 +50,15 @@ export const useTelemetryDeck = () => {
const device = platform.type || '';
const isIpad =
device !== 'mobile' && vendor === 'Apple' && 'ontouchend' in document;
const searchParams = new URLSearchParams(window.location.search);
td.clientUser = userId; // not associated with any other data
td.signal('LoadedHomePage', {
'country or tz': getCountry(), // trying to obscure tz by using country instead if we can
vendor,
'country or tz': getCountry(), // trying to obscure tz by using country - not using ip sniffing uses tz
device: isIpad ? 'tablet' : device,
url: window.location.href, // to understand if people are sharing with site filters or hashes
// Site specific data:
filteredBrowser: searchParams.get('browsers'), // what browsers are filtered?
filteredSpecs: searchParams.get('specsOff'), // what specs are filtered?
feature: window.location.hash, // which feature?
});
}, []);
};

0 comments on commit ce8f426

Please sign in to comment.