README.md in staccato-0.3.1 vs README.md in staccato-0.4.0
- old
+ new
@@ -29,11 +29,11 @@
```ruby
tracker = Staccato.tracker('UA-XXXX-Y') # REQUIRED, your Google Analytics Tracking ID
```
-`#tracker` optionally takes a second param for the `client_id` value
+`#tracker` optionally takes a second param for the `client_id` value.
By default, the `client_id` is set to a random UUID with `SecureRandom.uuid`
### Track some data ###
```ruby
@@ -134,11 +134,12 @@
:application_installer_id,
:experiment_id,
:experiment_variant,
:product_action,
:product_action_list,
- :promotion_action]
+ :promotion_action,
+ :geographical_id]
```
Boolean options like `anonymize_ip` will be converted from `true`/`false` into `1`/`0` as per the tracking API docs.
#### Custom Dimensions and Metrics ####
@@ -174,11 +175,11 @@
# end a session
tracker.pageview(path: '/blog', end_session: true)
```
-Other options are acceptable to start and end a session: `session_start`, `sessoin_end`, and `stop_session`.
+Other options are acceptable to start and end a session: `session_start`, `session_end`, and `stop_session`.
#### Content Experiment ####
```ruby
# Tracking an Experiment
@@ -463,9 +464,39 @@
```ruby
tracker = Staccato.tracker('UA-XXXX-Y') do |c|
c.adapter = CustomAdapter.new(Stacatto.ga_collection_uri, read_timeout: 1, open_time: 1)
end
```
+
+### Validation Adapter ###
+
+The validation adapter sends hits to the debug endpoint, which responds with information about the validity of the hit.
+
+```ruby
+tracker = Staccato.tracker('UA-XXXX-Y') do |c|
+ c.adapter = Staccato::Adapter::Validate.new
+end
+```
+
+By default, the staccato `default_adapter` is used to send validation hits, but a different adapter can be used (e.g. `Faraday` or `Net::HTTP`).
+
+```ruby
+tracker = Staccato.tracker('UA-XXXX-Y') do |c|
+ c.adapter = Staccato::Adapter::Validate.new(Staccato::Adapter::HTTP)
+end
+```
+
+### UDP Adapter for Staccato::Proxy ###
+
+If you're using [Staccato::Proxy](https://github.com/tpitale/staccato-proxy), you can point Staccato at it using the UDP adapter.
+
+```ruby
+tracker = Staccato.tracker('UA-XXXX-Y') do |c|
+ c.adapter = Staccato::Adapter::UDP.new(URI('udp://127.0.0.1:3003'))
+end
+```
+
+Be sure to set the ip or host and port to wherever you have configured Staccato::Proxy to run.
## Contributing ##
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)