Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from leahciMic/DP-77-Add-defaultContext-to-Forn…
Browse files Browse the repository at this point in the history
…ax-consumer

DP-77 Add defaultContext for Fornax consumer
  • Loading branch information
leahciMic committed May 15, 2014
2 parents f14e069 + b37da7b commit 1f74342
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Analytics/Consumer/Fornax.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ private function write($body) {
$body['anonymousId'] = $this->options['anonymousId'];
}

if (isset($this->options['defaultContext']) && is_array($this->options['defaultContext'])) {
$body['context'] = array_merge($this->options['defaultContext'], $body['context']);
}

$content = json_encode($body);
$content.= "\n";

Expand Down

0 comments on commit 1f74342

Please sign in to comment.