diff --git a/scripts/guided-mode/guided-curate-dataset.js b/scripts/guided-mode/guided-curate-dataset.js index a6f33f0583..714a769cb8 100644 --- a/scripts/guided-mode/guided-curate-dataset.js +++ b/scripts/guided-mode/guided-curate-dataset.js @@ -7415,6 +7415,9 @@ const patchPreviousGuidedModeVersions = async () => { sodaJSONObj["digital-metadata"]["license"] = ""; } + if (!sodaJSONObj["curation-mode"]) { + sodaJSONObj["cuartion-mode"] = "guided"; + } // If no other conditions are met, return the page the user was last on return sodaJSONObj["page-before-exit"]; }; @@ -7625,6 +7628,7 @@ guidedCreateSodaJSONObj = () => { sodaJSONObj = {}; sodaJSONObj["guided-options"] = {}; + sodaJSONObj["cuartion-mode"] = "guided"; sodaJSONObj["bf-account-selected"] = {}; sodaJSONObj["dataset-structure"] = { files: {}, folders: {} }; sodaJSONObj["generate-dataset"] = {}; diff --git a/scripts/metadata-files/manifest.js b/scripts/metadata-files/manifest.js index 37dd635eae..e439545433 100644 --- a/scripts/metadata-files/manifest.js +++ b/scripts/metadata-files/manifest.js @@ -1335,13 +1335,18 @@ const initiate_generate_manifest_bf = async () => { // Verify the origin of dataset for kombucha tracking let origin = ""; - if ("local-path" in sodaJSONObj["starting-point"]) { - origin = "Local"; + if (document.getElementById("create_manifest-section").classList.contains("is-shown")) { + // If the standalone manifest generator tab is currently shown + origin = "standalone-manifest-generator"; + } else if (sodaJSONObj?.["cuartion-mode"] === "guided") { + // If the special guided mode curation-mode key is found + origin = "guided-mode-manifest-generator"; + } else { + // Otherwise the manifest files were generated in FFM + origin = "free-form-mode-manifest-gerator"; } - if ("bf" in sodaJSONObj["starting-point"]["type"]) { - origin = "Pennsieve"; - } + console.log("origin", origin); // log the manifest file creation to analytics logMetadataForAnalytics(