【问题标题】:How do I add an event tracking script from Active Campaign to a squarespace website?如何将 Active Campaign 中的事件跟踪脚本添加到 squarespace 网站?
【发布时间】:2021-12-23 08:15:20
【问题描述】:

我正在尝试跟踪在我的客户网站(Squarespace)上发生的事件,以便我可以将这些事件用于 Active Campaign 中的营销自动化。

我通读了这篇文章:https://help.activecampaign.com/hc/en-us/articles/221870128-An-overview-of-Event-Tracking#an-overview-of-event-tracking-0-0

关于如何设置,但由于我不是 API 专家,我发现很难理解,因为我不编写脚本。 这是我作为示例给出的代码;

$curl = curl_init(); 

curl_setopt($curl, CURLOPT_URL, "https://trackcmp.net/event"); 

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true);

curl_setopt($curl, CURLOPT_POSTFIELDS, array( "actid" => 23033, "key" => "c12973b078007927842301eff932e7d78b74b3e", "event" => "YOUR_EVENT", "eventdata" => "ANY_DATA", "visit" => json_encode(array( // If you have an email address, assign it here. "email" => "", )), )); 

$result = curl_exec($curl); 

if ($result !== false) {
    $result = json_decode($result); 
    if ($result->success) { 
        echo 'Success! '; 
    } else {
        echo 'Error! '; 
    } 
    echo $result->message; 
    } 
else { 
    echo 'CURL failed to run: ', curl_error($curl); 
}

请有人帮助我一步一步指导我该怎么做。

【问题讨论】:

    标签: php api rest curl activecampaign


    【解决方案1】:

    根据我在 Squarespace 上阅读的内容,它们不会让您完全控制网站的代码。您在他们的平台上,使用他们的编辑器,并且只能使用他们的工具,而不是第 3 方的工具(除非他们提供与第 3 方的集成)。

    退房

    了解他们提供的分析工具。

    如果这些对您来说还不够,您需要联系 Squarespace 寻求帮助,请求他们缺少哪些功能(可能需要付费)和/或使用自定义内容管理系统(例如 WordPress)或自定义的,并且可能聘请 Web 开发人员来实施一个分析系统,该系统拥有您需要的一切。

    【讨论】:

    • 谢谢。我一定会联系squarespace
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-02
    • 1970-01-01
    相关资源
    最近更新 更多