Skip to content

Commit

Permalink
added methods to get current ip and user agent (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur authored and mattab committed Feb 18, 2017
1 parent 41dd1c0 commit 5f43529
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions PiwikTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,23 @@ public function getVisitorId()
return $this->randomVisitorId;
}

/**
* Returns the currently set user agent.
* @return string
*/
public function getUserAgent()
{
return $this->userAgent;
}

/**
* Returns the currently set IP address.
* @return string
*/
public function getIp()
{
return $this->ip;
}

/**
* Returns the User ID string, which may have been set via:
Expand Down

0 comments on commit 5f43529

Please sign in to comment.