onlineactivitybv/php-advertiserpostback
Composer 安装命令:
composer require onlineactivitybv/php-advertiserpostback
包简介
PHP Library to setup postback tracking
README 文档
README
PHP Library to setup postback tracking
Installation
Composer:
$ composer require onlineactivitybv/php-advertiserpostback "^2"
Requirements
PHP 7.0+, Curl
Usage
Init:
require __DIR__ . '/vendor/autoload.php'; use OnlineActivityBV\AdvertiserPostback\AdvertiserPostback; $oa = new AdvertiserPostback( 'abdddsdsdsjhdshjshj33jhhjdshjc', /* Here credentials provided by OA **/ 'oa6.nl', /* tracking domain, provided by OA */ 'oa_clickid' /* $_GET variable name used to send click id to lander **/);
Landingpage:
Add this code to the TOP of your landing page (sets cookie so needs to be before any other output.
$oa->landingPage();
Thank you page:
Save OA ClickId to your database and link to conversion
$clickId = $oa->getClickId();
With ClickID you can either choose to run postback on thank you page or you can call the postback on a later moment, with the clickId extracted from your database.
// first outout thank you HTML. fastcgi_finish_request(); // optional, recommended not to delay output of thank you HTML. $conversionStatus = $oa->addConversion($lead_id = 376, $eventId, $clickId);
统计信息
- 总下载量: 1.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-25