You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
231
231
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
+
232
242
## Contributors
233
243
234
244
* 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
0 commit comments