Skip to content

Commit

Permalink
fmk - adding GA4.html, modifying main for GA4, fixing a QT version in…
Browse files Browse the repository at this point in the history
… ResultsPelicun
  • Loading branch information
fmckenna committed Sep 30, 2023
1 parent 51a4d47 commit efc5e39
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
25 changes: 25 additions & 0 deletions GA4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JWNPJMZVTK"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-JWNPJMZVTK');
</script>
</head>

<body>
<h1> This is the SimCentre PBE application.</h1>

<p>
<h2>Acknowledgment</h2>
<p>
<img src=":/imagesCommon/nsf.gif">
This work is based on material supported by the National Science Foundation under grants CMMI 1612843 and CMMI 2131111
</body>
</html>

2 changes: 1 addition & 1 deletion ResultsPelicun.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <SimCenterWidget.h>

#include <QtCharts/QChart>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
using namespace QtCharts;
#endif

Expand Down
25 changes: 19 additions & 6 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <QDir>
#include <QStandardPaths>
#include <QProcessEnvironment>
#include <QWebEngineView>

// customMessgaeOutput code from web:
// https://stackoverflow.com/questions/4954140/how-to-redirect-qdebug-qwarning-qcritical-etc-output
Expand Down Expand Up @@ -104,12 +105,6 @@ int main(int argc, char *argv[])

QApplication a(argc, argv);

//Setting Google Analytics Tracking Information
// GoogleAnalytics::SetMeasurementId("G-JWNPJMZVTK");
GoogleAnalytics::SetAPISecret("CL5znZLfQv6N2Tk1RJVMWg");
GoogleAnalytics::CreateSessionId();
GoogleAnalytics::StartSession();

//
// create a remote interface
//
Expand Down Expand Up @@ -197,6 +192,24 @@ int main(int argc, char *argv[])
qDebug() << "could not open stylesheet";
}

//Setting Google Analytics Tracking Information
GoogleAnalytics::SetMeasurementId("G-JWNPJMZVTK");
GoogleAnalytics::SetAPISecret("CL5znZLfQv6N2Tk1RJVMWg");
GoogleAnalytics::CreateSessionId();
GoogleAnalytics::StartSession();

// Opening a QWebEngineView and using github to get app geographic usage
QWebEngineView view;
view.setUrl(QUrl("https://nheri-simcenter.github.io/PBE/GA4.html"));
view.resize(1024, 750);
view.show();
view.hide();


//
// RUN the GUI
//

int res = a.exec();

//
Expand Down

0 comments on commit efc5e39

Please sign in to comment.