<commit_before>---
title: Universal Code support for middleman-google-analytics
description: I've sent a pull request to support Universal Code for middleman-google-analytics
date: 2014-04-16 10:00
public: true
tags: middleman, google analytics, pull request
alternate: true
---

As [Google announced][ga-blog], Universal Analytics became out of beta.

[This blog][this blog] is using [middleman-google-analytics] to embed Google Analytics code, so I need to paste the snippet or modify the extension to use Universal Analytics.

The extension helped me a lot, so I started improve that and sent pull requests.

READMORE

[danielbayerlein/middleman-google-analytics#15: **Universal code support**][pr15]

This update adds `google_analytics_universal_tag` to helper methods with existing `google_analytics_tag`.

```erb
<%= google_analytics_universal_tag %>
```

I also send a pull request to add [unit tests] the project does not have yet. I enjoyed [Cucumber] coding <3

[danielbayerlein/middleman-google-analytics#14: **Added Cucumber tests**][pr14]

I hope that will merge happily, but if not, you can use the updates with referring my repos. (I do.)

```ruby
gem 'middleman-google-analytics', :github => 'ngs/middleman-google-analytics'
```

## Update 2014-04-17 05:40

Merged!

[![](2014-04-13-middleman-ogp/merge.png)][pr15]

The version was bumped to [0.1.0] and released to [RubyGems].

```ruby
gem 'middleman-google-analytics', '~> 0.1.0'
```

[ga-blog]: http://analytics.blogspot.jp/2014/04/universal-analytics-out-of-beta-into.html
[middleman-google-analytics]: https://github.com/danielbayerlein/middleman-google-analytics/
[this blog]: http://ja.ngs.io/
[pr14]: https://github.com/danielbayerlein/middleman-google-analytics/pull/14
[pr15]: https://github.com/danielbayerlein/middleman-google-analytics/pull/15
[test code]: https://github.com/ngs/middleman-google-analytics/blob/c82d5deeb0e8295122b1ebcfbe8193c11980f462/features/helper.feature
[Cucumber]: http://cukes.info/
[0.1.0]: https://github.com/danielbayerlein/middleman-google-analytics/commit/c28a5fc1e0f72cd206ba5f8733c3655935501b9c
[RubyGems]: http://rubygems.org/gems/middleman-google-analytics
<commit_msg>send -> sent<commit_after>---
title: Universal Code support for middleman-google-analytics
description: I've sent a pull request to support Universal Code for middleman-google-analytics
date: 2014-04-16 10:00
public: true
tags: middleman, google analytics, pull request
alternate: true
---

As [Google announced][ga-blog], Universal Analytics became out of beta.

[This blog][this blog] is using [middleman-google-analytics] to embed Google Analytics code, so I need to paste the snippet or modify the extension to use Universal Analytics.

The extension helped me a lot, so I started improve that and sent pull requests.

READMORE

[danielbayerlein/middleman-google-analytics#15: **Universal code support**][pr15]

This update adds `google_analytics_universal_tag` to helper methods with existing `google_analytics_tag`.

```erb
<%= google_analytics_universal_tag %>
```

I also sent a pull request to add [unit tests] the project does not have yet. I enjoyed [Cucumber] coding <3

[danielbayerlein/middleman-google-analytics#14: **Added Cucumber tests**][pr14]

I hope that will merge happily, but if not, you can use the updates with referring my repos. (I do.)

```ruby
gem 'middleman-google-analytics', :github => 'ngs/middleman-google-analytics'
```

## Update 2014-04-17 05:40

Merged!

[![](2014-04-13-middleman-ogp/merge.png)][pr15]

The version was bumped to [0.1.0] and released to [RubyGems].

```ruby
gem 'middleman-google-analytics', '~> 0.1.0'
```

[ga-blog]: http://analytics.blogspot.jp/2014/04/universal-analytics-out-of-beta-into.html
[middleman-google-analytics]: https://github.com/danielbayerlein/middleman-google-analytics/
[this blog]: http://ja.ngs.io/
[pr14]: https://github.com/danielbayerlein/middleman-google-analytics/pull/14
[pr15]: https://github.com/danielbayerlein/middleman-google-analytics/pull/15
[test code]: https://github.com/ngs/middleman-google-analytics/blob/c82d5deeb0e8295122b1ebcfbe8193c11980f462/features/helper.feature
[Cucumber]: http://cukes.info/
[0.1.0]: https://github.com/danielbayerlein/middleman-google-analytics/commit/c28a5fc1e0f72cd206ba5f8733c3655935501b9c
[RubyGems]: http://rubygems.org/gems/middleman-google-analytics

{'fraction_non_alphanumeric': 0.12835205134082053, 'fraction_numerical': 0.053174421269768506, 'mean_word_length': 5.3246376811594205, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3743264', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1452, 'n_words': 377}