lukapeharda / improvely
Improvely API PHP SDK
Requires
- guzzlehttp/guzzle: 6.3.*
This package is auto-updated.
Last update: 2024-11-04 23:50:05 UTC
README
Server-side HTTP API that you can use to perform account management tasks and to add conversion events that do not occur on your website, but can still be linked to a specific website visitor, such as recurring bills.
Installation
composer require lukapeharda/improvely
Requirements
Make sure to find your Improvely API key and project ID.
Usage
Conversions
Docs for conversions can be found here. Make sure to check required params, its combos and all other attributes.
key
and project
attributes will be auto inserted, all others can be set freely.
In order to be able to record a conversion, you need to label your visitor beforehand.
Recording a conversion:
... $apiKey = '#YOUR_API_KEY#'; $projectID = '#YOUR_PROJECT_ID#'; $client = new LukaPeharda\Improvely\Conversion($apiKey, $projectId); $params = [ 'label' => '#LABELED_VISITOR_ID_OR_EMAIL_OR_USERNAME#', // this value depends on what you've used to label your user with 'goal' => 'purchase', 'revenue' => 19.99, ]; $response = $client->record($params); ...
Other API endpoints
So far only conversions have been implemented. For other actions do submit an issue or do a pull request. Thank you.