Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Commit

Permalink
Adds Tracking to MailTo Links
Browse files Browse the repository at this point in the history
  • Loading branch information
austpere committed Oct 31, 2017
1 parent 9fd240d commit 31107d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h1 class="page-header">Our blog has moved</h1>
<p class="lead">Our blog has moved. We're now on <a href="http://blog.filmhub.com">tumblr</a>.</p>
<p>Thanks for stopping by. You can also get social with us on <a href="//facebook.com/kinonation">Facebook</a> or <a href="//twitter.com/kinonation1">Twitter</a>, or browse through lots of information in our <a href="https://filmhub.zendesk.com/">Help Center</a>.</p>
<p class="lead">Our blog has moved. We're now on <a href="http://blog.filmhub.com">Medium</a>.</p>
<p>Thanks for stopping by. You can also get social with us on <a href="//facebook.com/filmhubhq">Facebook</a> or <a href="//twitter.com/filmhubhq">Twitter</a>, or browse through lots of information in our <a href="https://filmhub.zendesk.com/">Help Center</a>.</p>
<hr />
<p><a href="/" class="">Back to home page &rarr;</a></p>

Expand Down
24 changes: 24 additions & 0 deletions track/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: bootstrap
title: Filmhub Campaign Tracking
---

<script>

/*
Example URL:
http://filmhub.com/track?mailto=mailto:johndoe@example.com?subject=Order%20from%20John%20Doe&body=Order%20from%20John
*/

var params = (new URL(document.location.href)).searchParams;
if ((params.get("mailto") || {}).length == 0 || (params.get("mailto") || {}).length == null) {
window.location.replace("/")
} else {
var mailtoParsed = encodeURI(params.get("mailto")) + "&body=" + encodeURI(params.get("body"));
window.location.replace(mailtoParsed);
setInterval(function(){document.location.href="/";}, 3000);
}
</script>

0 comments on commit 31107d6

Please sign in to comment.