Browse Source

Merge branch 'CURA-8441_campaign_links' of github.com:Ultimaker/Cura

Jaime van Kessel 3 years ago
parent
commit
8b2904ee3b

+ 1 - 1
com.ultimaker.cura.appdata.xml

@@ -28,6 +28,6 @@
       <image>https://raw.githubusercontent.com/Ultimaker/Cura/master/screenshot.png</image>
     </screenshot>
   </screenshots>
-  <url type="homepage">https://ultimaker.com/en/products/cura-software?utm_source=cura&amp;utm_medium=software&amp;utm_campaign=resources</url>
+  <url type="homepage">https://ultimaker.com/software/ultimaker-cura?utm_source=cura&amp;utm_medium=software&amp;utm_campaign=cura-update-linux</url>
   <translation type="gettext">Cura</translation>
 </component>

+ 1 - 1
cura/CuraActions.py

@@ -35,7 +35,7 @@ class CuraActions(QObject):
         # Starting a web browser from a signal handler connected to a menu will crash on windows.
         # So instead, defer the call to the next run of the event loop, since that does work.
         # Note that weirdly enough, only signal handlers that open a web browser fail like that.
-        event = CallFunctionEvent(self._openUrl, [QUrl("https://ultimaker.com/en/resources/manuals/software")], {})
+        event = CallFunctionEvent(self._openUrl, [QUrl("https://ultimaker.com/en/resources/manuals/software?utm_source=cura&utm_medium=software&utm_campaign=dropdown-documentation")], {})
         cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
 
     @pyqtSlot()

+ 1 - 1
cura/CuraApplication.py

@@ -161,7 +161,7 @@ class CuraApplication(QtApplication):
 
         self.default_theme = "cura-light"
 
-        self.change_log_url = "https://ultimaker.com/ultimaker-cura-latest-features"
+        self.change_log_url = "https://ultimaker.com/ultimaker-cura-latest-features?utm_source=cura&utm_medium=software&utm_campaign=cura-update-features"
 
         self._boot_loading_time = time.time()
 

+ 5 - 4
cura/OAuth2/AuthorizationService.py

@@ -24,7 +24,7 @@ if TYPE_CHECKING:
     from cura.OAuth2.Models import UserProfile, OAuth2Settings
     from UM.Preferences import Preferences
 
-MYCLOUD_LOGOFF_URL = "https://mycloud.ultimaker.com/logoff"
+MYCLOUD_LOGOFF_URL = "https://account.ultimaker.com/logoff?utm_source=cura&utm_medium=software&utm_campaign=change-account-before-adding-printers"
 
 class AuthorizationService:
     """The authorization service is responsible for handling the login flow, storing user credentials and providing
@@ -209,10 +209,11 @@ class AuthorizationService:
                                      link to force the a browser logout from mycloud.ultimaker.com
         :return: The authentication URL, properly formatted and encoded
         """
-        auth_url = "{}?{}".format(self._auth_url, urlencode(query_parameters_dict))
+        auth_url = f"{self._auth_url}?{urlencode(query_parameters_dict)}"
         if force_browser_logout:
-            # The url after '?next=' should be urlencoded
-            auth_url = "{}?next={}".format(MYCLOUD_LOGOFF_URL, quote_plus(auth_url))
+            connecting_char = "&" if "?" in MYCLOUD_LOGOFF_URL else "?"
+            # The url after 'next=' should be urlencoded
+            auth_url = f"{MYCLOUD_LOGOFF_URL}{connecting_char}next={quote_plus(auth_url)}"
         return auth_url
 
     def _onAuthStateChanged(self, auth_response: AuthenticationResponse) -> None:

+ 2 - 2
plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml

@@ -96,7 +96,7 @@ Item
             visible: createNewProjectButtonVisible && !manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed)
             tooltip: "Maximum number of projects reached. Please upgrade your subscription to create more projects."
 
-            onClicked: Qt.openUrlExternally("https://ultimaker.com/software/ultimaker-essentials/sign-up-cura?utm_source=cura&utm_medium=software&utm_campaign=lib-max")
+            onClicked: Qt.openUrlExternally("https://ultimaker.com/software/enterprise-software?utm_source=cura&utm_medium=software&utm_campaign=MaxProjLink")
         }
     }
 
@@ -139,7 +139,7 @@ Item
                 id: visitDigitalLibraryButton
                 anchors.horizontalCenter: parent.horizontalCenter
                 text: "Visit Digital Library"
-                onClicked:  Qt.openUrlExternally(CuraApplication.ultimakerDigitalFactoryUrl + "/app/library")
+                onClicked:  Qt.openUrlExternally(CuraApplication.ultimakerDigitalFactoryUrl + "/app/library?utm_source=cura&utm_medium=software&utm_campaign=empty-library")
                 visible: searchBar.text === "" //Show the link to Digital Library when there are no projects in the user's Library.
             }
         }

+ 1 - 1
plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py

@@ -319,7 +319,7 @@ class DFFileExportAndUploadManager:
 
     def _onMessageActionTriggered(self, message, action):
         if action == "open_df_project":
-            project_url = "{}/app/library/project/{}?wait_for_new_files=true".format(CuraApplication.getInstance().ultimakerDigitalFactoryUrl, self._library_project_id)
+            project_url = "{}/app/library/project/{}?wait_for_new_files=true&utm_source=cura&utm_medium=software&utm_campaign=saved-library-file-message".format(CuraApplication.getInstance().ultimakerDigitalFactoryUrl, self._library_project_id)
             QDesktopServices.openUrl(QUrl(project_url))
             message.hide()
 

+ 1 - 1
plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcase.qml

@@ -39,7 +39,7 @@ Rectangle
                 text: catalog.i18nc("@info:tooltip", "Go to Web Marketplace")
                 Label
                 {
-                    text: "<a href='%2'>".arg(toolbox.getWebMarketplaceUrl("materials")) + catalog.i18nc("@label", "Search materials") + "</a>"
+                    text: "<a href='%2'>".arg(toolbox.getWebMarketplaceUrl("materials") + "?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search") + catalog.i18nc("@label", "Search materials") + "</a>"
                     width: contentWidth
                     height: contentHeight
                     horizontalAlignment: Text.AlignRight

+ 1 - 1
plugins/Toolbox/resources/qml/components/ToolboxHeader.qml

@@ -91,7 +91,7 @@ Item
             verticalCenter: parent.verticalCenter
         }
         acceptedButtons: Qt.LeftButton
-        onClicked: Qt.openUrlExternally(toolbox.getWebMarketplaceUrl("plugins"))
+        onClicked: Qt.openUrlExternally(toolbox.getWebMarketplaceUrl("plugins") + "?utm_source=cura&utm_medium=software&utm_campaign=marketplace-button")
         UM.RecolorImage
         {
             id: cloudMarketplaceButton

+ 1 - 1
plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml

@@ -173,7 +173,7 @@ Cura.MachineAction
                     anchors.right: parent.right
                     wrapMode: Text.WordWrap
                     renderType: Text.NativeRendering
-                    text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://support.ultimaker.com/hc/en-us/articles/360012795419");
+                    text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=manage-network-printer");
                     onLinkActivated: Qt.openUrlExternally(link)
                 }
 

+ 4 - 4
plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py

@@ -262,7 +262,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
                           icon="",
                           description=I18N_CATALOG.i18nc("@action:tooltip", "Track the print in Ultimaker Digital Factory"),
                           button_align=message.ActionButtonAlignment.ALIGN_RIGHT)
-        df_url = f"https://digitalfactory.ultimaker.com/app/jobs/{self._cluster.cluster_id}?utm_source=cura&utm_medium=software&utm_campaign=monitor-button"
+        df_url = f"https://digitalfactory.ultimaker.com/app/jobs/{self._cluster.cluster_id}?utm_source=cura&utm_medium=software&utm_campaign=message-printjob-sent"
         message.pyQtActionTriggered.connect(lambda message, action: (QDesktopServices.openUrl(QUrl(df_url)), message.hide()))
 
         message.show()
@@ -334,11 +334,11 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
 
     @pyqtSlot(name="openPrintJobControlPanel")
     def openPrintJobControlPanel(self) -> None:
-        QDesktopServices.openUrl(QUrl(self.clusterCloudUrl))
+        QDesktopServices.openUrl(QUrl(self.clusterCloudUrl)+ "?utm_source=cura&utm_medium=software&utm_campaign=monitor-manage-browser")
 
     @pyqtSlot(name="openPrinterControlPanel")
     def openPrinterControlPanel(self) -> None:
-        QDesktopServices.openUrl(QUrl(self.clusterCloudUrl))
+        QDesktopServices.openUrl(QUrl(self.clusterCloudUrl + "?utm_source=cura&utm_medium=software&utm_campaign=monitor-manage-printer"))
 
     @property
     def clusterData(self) -> CloudClusterResponse:
@@ -357,4 +357,4 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
         """Gets the URL on which to monitor the cluster via the cloud."""
 
         root_url_prefix = "-staging" if self._account.is_staging else ""
-        return "https://mycloud{}.ultimaker.com/app/jobs/{}".format(root_url_prefix, self.clusterData.cluster_id)
+        return "https://digitalfactory{}.ultimaker.com/app/jobs/{}".format(root_url_prefix, self.clusterData.cluster_id)

Some files were not shown because too many files changed in this diff