Sha256: f929558e050ab8f1faa4895ab2ab5145cc29f8ce77e5e1043ae90fa81d99e5ea
Contents?: true
Size: 680 Bytes
Versions: 2
Compression:
Stored size: 680 Bytes
Contents
var old_url = window.location.href; document.addEventListener("turbolinks:load", function() { //console.log("analytics load"); if (window[metrika]) { window[metrika].hit(window.location.href, document.title, old_url) } old_url = window.location.href if (window.gtag) { gtag('event', 'page_view'); // gtag('event', 'page_view', { 'send_to': 'YOUR_ID_HERE' }); } }); export default function(name) { if (window[metrika] && window[metrika].reachGoal) { window[metrika].reachGoal(name); } else { if (window.console) { console.log('unable to send event - no metrika'); } } //if (window.gtag) { //gtag('event', name); //} };
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rocket_cms-0.25.1 | lib/generators/rocket_cms/templates/webpack/analytics.es6 |
rocket_cms-0.25.0 | lib/generators/rocket_cms/templates/webpack/analytics.es6 |