Skip to content

Instantly share code, notes, and snippets.

@dleatherman
Last active November 7, 2016 15:15
Show Gist options
  • Save dleatherman/f28afc081ef7a04760b205c360e9b35d to your computer and use it in GitHub Desktop.
Save dleatherman/f28afc081ef7a04760b205c360e9b35d to your computer and use it in GitHub Desktop.
<figure class="op-tracker">
<iframe>
<script>
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,"script","//www.google-analytics.com/analytics.js","ga");
ga("create", "UA-XXXXXXX-X", "auto");
ga("require", "displayfeatures");
ga('set', 'dimension1', '<?php echo esc_html( date('Ymd', strtotime($this->get_the_pubdate())) ) ?>', 3);
ga('set', 'forceSSL', false);
ga("send", "pageview", {title: "<?php echo esc_html( $this->get_the_title() ); ?>"});
</script>
</iframe>
</figure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment