Skip to content

Instantly share code, notes, and snippets.

@timlenardo
Last active May 4, 2019 01:44
Show Gist options
  • Save timlenardo/db139bdda61e0ccd7c76b586e5a5c49f to your computer and use it in GitHub Desktop.
Save timlenardo/db139bdda61e0ccd7c76b586e5a5c49f to your computer and use it in GitHub Desktop.
<script>
var xhr = new XMLHttpRequest();
var siteId = 'chasethetrend';
var split = window.location.href.split('?');
var params = split.length > 1 ? split[1] : "";
var url = split[0];
xhr.open('GET', 'https://plugco.in/add_external_page_view?url=' + encodeURI(url) + '&site_id=' + encodeURI(siteId) + '&' + params);
xhr.send();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment