Skip to content

Commit 6b9d0a3

Browse files
committed
Updating docs for v2.6.0
1 parent 5f731d7 commit 6b9d0a3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## Version 2
2+
### 2.6.0 (2017-04-10)
3+
* Adding Disabling library feature, by @edim24
4+
25
### 2.5.1 (2017-03-20)
36
* Fixing required params for all hits, either Client ID or User ID
47

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Google Analytics Measurement Protocol library for PHP
22
===========================
3-
[![Build Status](https://travis-ci.org/theiconic/php-ga-measurement-protocol.svg?branch=v2.5.1)](https://travis-ci.org/theiconic/php-ga-measurement-protocol) [![Coverage Status](https://coveralls.io/repos/theiconic/php-ga-measurement-protocol/badge.svg?branch=master&service=github)](https://coveralls.io/github/theiconic/php-ga-measurement-protocol?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/theiconic/php-ga-measurement-protocol/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/theiconic/php-ga-measurement-protocol/?branch=master) [![Latest Stable Version](https://poser.pugx.org/theiconic/php-ga-measurement-protocol/v/stable)](https://packagist.org/packages/theiconic/php-ga-measurement-protocol) [![Total Downloads](https://poser.pugx.org/theiconic/php-ga-measurement-protocol/downloads)](https://packagist.org/packages/theiconic/php-ga-measurement-protocol) [![License](https://poser.pugx.org/theiconic/php-ga-measurement-protocol/license)](https://packagist.org/packages/theiconic/php-ga-measurement-protocol) [![Documentation Status](https://readthedocs.org/projects/php-ga-measurement-protocol/badge/?version=latest)](http://php-ga-measurement-protocol.readthedocs.org/en/latest/) [![Dependency Status](https://www.versioneye.com/user/projects/54fa7f46fcd47acff1000068/badge.svg?style=flat)](https://www.versioneye.com/user/projects/54fa7f46fcd47acff1000068)
3+
[![Build Status](https://travis-ci.org/theiconic/php-ga-measurement-protocol.svg?branch=v2.6.0)](https://travis-ci.org/theiconic/php-ga-measurement-protocol) [![Coverage Status](https://coveralls.io/repos/theiconic/php-ga-measurement-protocol/badge.svg?branch=master&service=github)](https://coveralls.io/github/theiconic/php-ga-measurement-protocol?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/theiconic/php-ga-measurement-protocol/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/theiconic/php-ga-measurement-protocol/?branch=master) [![Latest Stable Version](https://poser.pugx.org/theiconic/php-ga-measurement-protocol/v/stable)](https://packagist.org/packages/theiconic/php-ga-measurement-protocol) [![Total Downloads](https://poser.pugx.org/theiconic/php-ga-measurement-protocol/downloads)](https://packagist.org/packages/theiconic/php-ga-measurement-protocol) [![License](https://poser.pugx.org/theiconic/php-ga-measurement-protocol/license)](https://packagist.org/packages/theiconic/php-ga-measurement-protocol) [![Documentation Status](https://readthedocs.org/projects/php-ga-measurement-protocol/badge/?version=latest)](http://php-ga-measurement-protocol.readthedocs.org/en/latest/) [![Dependency Status](https://www.versioneye.com/user/projects/54fa7f46fcd47acff1000068/badge.svg?style=flat)](https://www.versioneye.com/user/projects/54fa7f46fcd47acff1000068)
44

55
## Description
66

@@ -229,6 +229,16 @@ print_r($debugResponse);
229229

230230
GA actually returns a JSON that is parsed into an associative array. Read ([here](https://developers.google.com/analytics/devguides/collection/protocol/v1/validating-hits)) to understand how to interpret response.
231231

232+
### Disable library hits for Staging/Dev environments
233+
234+
In your app configuration, you can have a flag for enabling or disabling the library, this in order to not actually
235+
send hits to GA, in this case the lib returns a AnalyticsResponseInterface object that returns empty values.
236+
237+
```php
238+
// Instantiate the Analytics object by passing the second parameter in the constructor as TRUE
239+
$analytics = new Analytics(true, true);
240+
```
241+
232242
## Contributors
233243

234244
* Jorge A. Borges - Lead Developer ([http://jorgeborges.me](http://jorgeborges.me))
@@ -241,6 +251,7 @@ GA actually returns a JSON that is parsed into an associative array. Read ([here
241251
* Titouan Benoit - [nightbr](https://github.com/Nightbr)
242252
* Hayashi Ryo - [ryo88c](https://github.com/ryo88c)
243253
* Radek Hřebeček - [http://www.hrebecek.cz/](http://www.hrebecek.cz)
254+
* edim24 - [ryo88c](https://github.com/edim24)
244255

245256
## License
246257

0 commit comments

Comments
 (0)