Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
nkokla committed Dec 27, 2023
1 parent 4af4b72 commit f87a52a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/util/analytics-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const getTrackEvent = ({category, action, name, value = 1}) => {
}
}

export const getDownloadTrackEvent = ({
export const getDownloadToEventTracker = ({
downloadDataType,
downloadFileName,
nbDownload = 1,
Expand All @@ -36,7 +36,6 @@ export const getDownloadTrackEvent = ({

return {
url,
download: url,
trackEvent: {
category: 'Download',
action: `Download Data ${downloadDataType}`,
Expand Down
4 changes: 2 additions & 2 deletions pages/data/[[...path]].js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f87a52a

Please sign in to comment.