Skip to content

Commit

Permalink
V1.3.7 disable ga4 (#133)
Browse files Browse the repository at this point in the history
* Disable GA4
* 1.3.7
  • Loading branch information
jamland authored Dec 27, 2020
1 parent d13e374 commit 80661e8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "samplescope",
"productName": "Samplescope",
"version": "1.3.6",
"version": "1.3.7",
"description": "Search samples over internet sources",
"main": ".webpack/main",
"repository": "github:jamland/samplescope",
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AppHeader from '@components/AppHeader';
import Settings from '@components/Settings';
import ErrorTracker from '@modules/analytics/bugsnag.renderer';
import { AppContextProvider } from './context/App.context';
import GA4 from '@modules/analytics/ga4';
// import GA4 from '@modules/analytics/ga4';

import './styles/global.css';
import './styles/theme.css';
Expand All @@ -15,11 +15,11 @@ import os from 'os';

const App = () => {
const platform = os?.platform();
try {
GA4.register();
} catch (error) {
console.warn('Error registering GA4: ', error.message);
}
// try {
// GA4.register();
// } catch (error) {
// console.warn('Error registering GA4: ', error.message);
// }

return (
// @ts-ignore
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/components/AppHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppContext } from '~/context/App.context';
import SearchIcon from '~/components/icons/SearchIcon';
import { WithErrorBoundary } from '@components/Errors/ErrorBoundary';
import eventEmitter from '@modules/EventEmitter';
import GA4 from '@modules/analytics/ga4';
// import GA4 from '@modules/analytics/ga4';

import freesoundLogo from '~/images/samplescope-icon.png';
import './index.css';
Expand All @@ -20,9 +20,9 @@ const AppHeader: React.FC<{}> = () => {
() => {
setDebouncedValue(inputValue);

GA4.sendEvent('search', {
search_term: inputValue ?? '',
});
// GA4.sendEvent('search', {
// search_term: inputValue ?? '',
// });
// analytics.trackEvent({
// name: 'SEARCH_TEXT',
// action: 'Search query changed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DownloadCloud } from 'react-feather';

import { SelectedSample } from '~/context/App.context';
import { SamplePreview } from '@modules/freesound-search/freesound.types';
import GA4 from '@modules/analytics/ga4';
// import GA4 from '@modules/analytics/ga4';

interface Props {
sample: SamplePreview;
Expand Down Expand Up @@ -65,10 +65,10 @@ const DownloadButton: React.FC<Props> = ({ sample }: Props) => {
setDownloading(true);
setProgress(0);

GA4.sendEvent('download', {
file_name: `${sample.id} ${sample.name}`,
sample_id: sample.id,
});
// GA4.sendEvent('download', {
// file_name: `${sample.id} ${sample.name}`,
// sample_id: sample.id,
// });
}
};

Expand Down

0 comments on commit 80661e8

Please sign in to comment.