Skip to content

Add user tracking to your PHP application with the official Open Web Analytics SDK for PHP.

License

Notifications You must be signed in to change notification settings

Open-Web-Analytics/owa-php-sdk

Repository files navigation

Open Web Analytics SDK for PHP

The OWA Software Development Kit for PHP makes it easy to use Open Web Analytics in your PHP code enabled you to easily as web analytics tracking to any PHP application. You can get started by installing The SDK via composer or downloading a tarball of our latest release. The SDK is licensed under GLP v2.0.

Resource

Getting Help

We use Github for managing bugs and feature requests and have limited bandwidth to provide general support. If you do require support please consider sponsoring the project.

Opening Issues

If you find a bug in the SDK, please let us know about it. However, before you create the ticket please search through the existing issues to make sure you it's not someting we already know nabout or have encountered in the past. When creating a new issue be sure to include the version of SDK, the PHP version, and operating system you are using. Also include a stack trace and detailed steps to reproduce the bug when appropriate.

Getting Started

  • Minimum requirements - to use the SDK you must be using OWA core v1.7.0 or later as well as PHP 7+. We highly recommend having your PHP compiled with the cURL extension.

  • Install the SDK with composer - composer require open-web-analytics/owa-php-sdk

  • User Guide - read the user guide in order to learn how to work wit the SDK.

Quick Example

Create a Tracker

$config = [
    'instance_url' => 'http://your.domain.com/owa/',
    'cookie_domain' => 'your.domain.com'
];

$sdk = new OwaSdk\sdk($config);
$tracker = $sdk->createTracker();
$tracker->setSiteId('9ceefbab8a804bc03cb0be196abe12f8');
$tracker->setPageTitle('Standalone PHP Test Page3');
$tracker->trackPageView();

?>

Realted OWA Products