GetResponse API标记用户依赖于访问过的页面

时间:2017-10-24 07:50:24

标签: php yii getresponse

我已将此API:https://github.com/GetResponse/getresponse-api-php集成到Yii应用程序中,作为组件。

我在理解有关此API的内容方面遇到了一些问题,所以我的问题是,我可以根据用户访问的页面标记我的用户吗?

1 个答案:

答案 0 :(得分:0)

这是我将用户添加到getresponse的代码段。

$wants_subscription = $_POST['getresponse_subscription'];
            if( $wants_subscription == 1 ){
                if( class_exists('GetResponse') ){
                    $get_response = new GetResponse('my-api-key');
                    $get_response->enterprise_domain = 'my-domain';
                    $get_response->api_url = 'https://api3.getresponse360.com/v3';

                    // Add contact
                    $add_contact = $get_response->addContact(array(
                        'name' => $_POST['name'],
                        'email' => $_POST['email'],
                        'daysofCycle' => 0,
                        'campaign' => array('campaignId' => 'x')

                    ));