Skip to content

Commit

Permalink
feat: add lib cost study survey in production (#856)
Browse files Browse the repository at this point in the history
* feat: add lib cost study survey in production

* fix: lint erors
  • Loading branch information
pghorpade authored Sep 24, 2024
1 parent 52508d1 commit 9884827
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
15 changes: 14 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ onMounted(async () => {
})
const shouldIncludeExtraScript = computed(() => {
if (useRuntimeConfig().public.hostName.indexOf('stage') > 0)
if (useRuntimeConfig().public.hostName.includes('stage'))
return true
return false
})
const shouldIncludeProductionScript = computed(() => {
if (!useRuntimeConfig().public.hostName.includes('stage') && !useRuntimeConfig().public.hostName.includes('test'))
return true
return false
})
Expand All @@ -74,6 +79,14 @@ useHead({
defer: true
}
]
: []),
...(shouldIncludeProductionScript.value
? [{
hid: 'gsurvey',
src: 'https://librarystudy.library.ucla.edu/gsurvey.js',
defer: true
}
]
: [])
]
})
Expand Down
15 changes: 14 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import { HeaderSmart, SectionWrapper, SiteNotificationAlert, FooterPrimary, FooterSock } from 'ucla-library-website-components'
const shouldIncludeExtraScript = computed(() => {
if (useRuntimeConfig().public.hostName.indexOf('stage') > 0)
if (useRuntimeConfig().public.hostName.includes('stage'))
return true
return false
})
const shouldIncludeProductionScript = computed(() => {
if (!useRuntimeConfig().public.hostName.includes('stage') && !useRuntimeConfig().public.hostName.includes('test'))
return true
return false
})
Expand All @@ -24,6 +29,14 @@ useHead({
defer: true
}
]
: []),
...(shouldIncludeProductionScript.value
? [{
hid: 'gsurvey',
src: 'https://librarystudy.library.ucla.edu/gsurvey.js',
defer: true
}
]
: [])
]
})
Expand Down

8 comments on commit 9884827

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f3c6db8306d2f6a450527c--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f440902e666323159d84f6--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f46f5f800e361e7e522d1b--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f5187a161dc494cba5fd63--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f5c0dfa744c245ba936496--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f669f7e1063bf6f074f832--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f6e532778c4da16aeb4089--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://66f7127e1465ede1c3106e01--uclalibrary.netlify.app

Please sign in to comment.