Skip to content

Commit

Permalink
feat: appzi updates (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalee authored Apr 12, 2024
1 parent 90c259d commit 057de19
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 7 additions & 1 deletion compose/neurosynth-frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
gtag('js', new Date());

gtag('config', 'G-0L9Y0HT9NR');

window.appziSettings = {
render: { type: 'client' }
}
</script>

<!-- Appzi: Capture Insightful Feedback -->
<script defer src="https://w.appzi.io/w.js?token=jFjBf"></script>

<script async src="https://w.appzi.io/w.js?token=jFjBf"></script>

<!-- End Appzi -->

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ import { IAnalysesSelection } from '../CreateMetaAnalysisSpecificationDialogBase
import { getFilteredAnnotationNotes } from '../CreateMetaAnalysisSpecificationSelectionStep/SelectAnalysesComponent/SelectAnalysesComponent.helpers';
import { getWeightAndConditionsForSpecification } from './CreateMetaAnalysisSpecificationReview.helpers';

const triggerAppziFeedbackPopup = () => {
const windowAppziObj = (window as any).appzi;
const alreadyPrompted = localStorage.getItem('APPZI_FEEDBACK_PROMPTED') === 'true';
if (windowAppziObj && !alreadyPrompted) {
localStorage.setItem('APPZI_FEEDBACK_PROMPTED', 'true');
windowAppziObj.openSurvey('03c0bd6a-d53d-4457-aae4-64d3cbc346d1');
}
};

const CreateMetaAnalysisSpecificationReview: React.FC<{
onNavigate: (button: ENavigationButton) => void;
onClose: () => void;
Expand Down Expand Up @@ -92,6 +101,8 @@ const CreateMetaAnalysisSpecificationReview: React.FC<{
});

navigate(`/projects/${projectId}/meta-analyses/${metaAnalysis.data.id}`);

triggerAppziFeedbackPopup();
};

const numSelectedAnnotationsText = useMemo(() => {
Expand Down

0 comments on commit 057de19

Please sign in to comment.