Skip to content

Commit

Permalink
Don't share the service gamp.analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
foaly-nr1 committed May 2, 2017
1 parent 3f6164b commit 3b302ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function registerBundles()

## Usage

This bundle exposes the service `gamp.analytics`. It is a [none shared service][3], i.e. each time you retrieve the service you'll get a *new* instance.

##### Example

``` php
Expand Down Expand Up @@ -143,6 +145,7 @@ This package is a wrapper around the GA Measurement Protocol PHP Library. Thanks

[1]: https://github.com/theiconic/php-ga-measurement-protocol
[2]: https://github.com/theiconic/php-ga-measurement-protocol#usage
[3]: http://symfony.com/doc/current/service_container/shared.html

## License

Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<services>
<service id="gamp.analytics.factory" class="%gamp.analytics.class%" public="false" />

<service id="gamp.analytics" class="TheIconic\Tracking\GoogleAnalytics\Analytics">
<service id="gamp.analytics" class="TheIconic\Tracking\GoogleAnalytics\Analytics" shared="false">
<factory service="gamp.analytics.factory" method="createAnalytics" />
<argument type="service" id="request_stack" />
<argument>%gamp.protocol_version%</argument>
Expand Down

0 comments on commit 3b302ff

Please sign in to comment.