Skip to content

Commit

Permalink
added matomo to home. Cleaned up some old files
Browse files Browse the repository at this point in the history
  • Loading branch information
two-trick-pony-NL committed Mar 28, 2022
1 parent 51b0129 commit 74a4755
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 81 deletions.
11 changes: 0 additions & 11 deletions website/templates/demo.html

This file was deleted.

24 changes: 23 additions & 1 deletion website/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,29 @@
<!-- Core theme CSS (includes Bootstrap)-->
<link href="{{ url_for('static',filename='styles/newstyles.css') }}" rel="stylesheet" />
<link href="{{ url_for('static',filename='styles/styles.css') }}" rel="stylesheet" />

<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "b80qerc4w0");
</script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setExcludedQueryParams", ["?targeturl.com","targeturl.com"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//petervandoorn.com/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '6']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->

</head>
<!-- This SCRIPT manages fading out of the alert after 2 secods-->
Expand Down
31 changes: 0 additions & 31 deletions website/templates/login.html

This file was deleted.

38 changes: 22 additions & 16 deletions website/templates/theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,29 @@
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="{{ url_for('static',filename='styles/styles.css') }}" rel="stylesheet" />

<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "b80qerc4w0");
</script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setCookieDomain", "*.grapevine.works"]);
_paq.push(["setExcludedQueryParams", ["?targeturl.com","targeturl.com"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//petervandoorn.com/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '6']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setCookieDomain", "*.grapevine.works"]);
_paq.push(["setExcludedQueryParams", ["?targeturl.com","targeturl.com"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//petervandoorn.com/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '6']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<!-- This SCRIPT manages fading out of the alert after 2 secods-->
Expand Down
22 changes: 0 additions & 22 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,7 @@ def createassets(username):
return redirect(url_for('views.home'))
return render_template("createassets.html", user=current_user,urlDetractorQR=urlDetractorQR,urlNeutralQR=urlNeutralQR, urlPromotorQR= urlPromotorQR, username=username,)


@views.route("/demo")
def demo():
return render_template("demo.html", user=current_user)

"""
@views.route("/create-post", methods=['GET', 'POST'])
@login_required
def create_post():
if request.method == "POST":
text = request.form.get('text')
if not text:
flash('Post cannot be empty', category='warning')
else:
post = Post(text=text, author=current_user.id)
db.session.add(post)
db.session.commit()
flash('Post created!', category='success')
return redirect(url_for('views.dashboard'))
return render_template('create_post.html', user=current_user)
"""
@views.route("/send-feedback/<user>/<rating>", methods=['GET', 'POST'])
def send_feedback(user, rating):
if request.method == "POST":
Expand Down

0 comments on commit 74a4755

Please sign in to comment.