Sha256: a42027bfc45302213a08f05a4131f433aac012cea50da2c19d77df9072a0a89c

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

<% if Rails.env == 'production' or Rails.env == 'staging' %>
<script>
    //Univeral Analytics
    // (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', "<%= APP_CONFIG['google_analytics_tracking_id'] %>", 'ncsu.edu'); //FIXME: Add id for quicksearch GA
    // ga('send', 'pageview');

    // Classic Analytics
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', "<%= QuickSearch::Engine::APP_CONFIG['google_analytics_tracking_id'] %>"]);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

</script>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
quick_search-core-0.0.1 app/views/layouts/quick_search/_google_analytics.html.erb
quick_search-core-0.0.1.test app/views/layouts/quick_search/_google_analytics.html.erb