hendrikschneider / jekyll-analytics

Plugin to easily add webanalytics to your jekyll site. Currently Google Analytics, Piwik and mPulse are supported.
https://github.com/hendrikschneider/jekyll-analytics
MIT License
218 stars 25 forks source link

Plugin showing extra text #19

Open simonhanmer opened 5 years ago

simonhanmer commented 5 years ago

Plugin configured in Gemfile: ... gem 'jekyll-analytics', '~> 0.1.11' ...

and added in _config.yml ... plugins:

running via JEKYLL_ENV=production bundle exec jekyll serve and I can see this text at the top of the page

closing tag, Google Analytics can be placed here -->

looking at the source of the page, I see:

    <!-- This goes before 
    <!-- Google Analytics -->
    <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','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-811002-18', 'auto');
  ga('send', 'pageview', { 'page': location.pathname + location.search + location.hash});
  ga('set', 'anonymizeIp', false);
    </script>
    <!-- End Google Analytics -->
    </head> closing tag, Google Analytics can be placed here --> 

    <!-- Google Analytics -->
hendrikschneider commented 5 years ago

Hey simonhanmer,

would you mind to post your template so that I can replicate the error?

Best wishes

simonhanmer commented 5 years ago

Hi, there's some test content showing the error at https://serverlesslabs.dev.

If you need specific files, let me know and I can zip and attach if needed.