We have made a library for PHP to help you start using A Trigger in a minute. This PHP library is made to avoid possible errors in your application. Even if ATrigger.com API server become unavailable, your application will work without any problem. On the other hand, all requests are Async by default and no slowness will happen.
- First you need to follow Quick Start Guide.
- You have this personal details from your Account Setup page:
- API Key
- API Secret
Step 1: InitializeAdd analytics-ruby to your project's Gemfile:
gem 'ATrigger' #gem install ATrigger
Then, add the following to your PHP script:
require_once("/path/to/atriggerphp/ATrigger.php"); //require(dirname(__FILE__) . '/ATriggerPHP/ATrigger.php');
You only need to call init once when your php file is requested. All of your files will then have access to the same ATrigger client.
ATrigger::init("YOUR_APIKey","YOUR_APISecret"); //Debug-friendly: ATrigger::init("YOUR_APIKey","YOUR_APISecret", false, true);
In development you might want to use development settings above to start debugging.
Step 2: Start Using, Functions