diff --git a/lib/util/analytics-tracker.js b/lib/util/analytics-tracker.js index 3618611f0..351d6ad83 100644 --- a/lib/util/analytics-tracker.js +++ b/lib/util/analytics-tracker.js @@ -26,7 +26,7 @@ export const getTrackEvent = ({category, action, name, value = 1}) => { } } -export const getDownloadTrackEvent = ({ +export const getDownloadToEventTracker = ({ downloadDataType, downloadFileName, nbDownload = 1, @@ -36,7 +36,6 @@ export const getDownloadTrackEvent = ({ return { url, - download: url, trackEvent: { category: 'Download', action: `Download Data ${downloadDataType}`, diff --git a/pages/data/[[...path]].js b/pages/data/[[...path]].js index 2cbde9f93..4e81aa8cc 100644 --- a/pages/data/[[...path]].js +++ b/pages/data/[[...path]].js @@ -8,7 +8,7 @@ import Head from '@/components/head' import Section from '@/components/section' import Page from '@/layouts/main' import Data from '@/views/data' -import sendToTracker, {getDownloadTrackEvent} from '@/lib/util/analytics-tracker' +import sendToTracker, {getDownloadToEventTracker} from '@/lib/util/analytics-tracker' import ErrorPage from '../_error' @@ -138,7 +138,7 @@ export async function getServerSideProps(context) { } try { - sendToTracker(getDownloadTrackEvent({ + sendToTracker(getDownloadToEventTracker({ downloadDataType: `${path.dirname(fileName).split('/')[0]}${req?.headers?.range ? ' (Partial)' : ''}`, downloadFileName: fileName, nbDownload: 1