-2

I am trying to track events happening on my client's website(Squarespace) so I can use these events for marketing automation in Active Campaign.

I read through this article: https://help.activecampaign.com/hc/en-us/articles/221870128-An-overview-of-Event-Tracking#an-overview-of-event-tracking-0-0

On how to setup but since I am not an API expert I am finding it difficult to understand as I do not program scripts. This is the code I was given as an example;

$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); 
}

Please can someone help me out with a step by step guide on what to do.

MrEbabi
  • 740
  • 5
  • 16

1 Answers1

0

From what I've read on Squarespace, they do not give you full control of the website's code. You are on their platform, working with their editor, and can only use their tooling, not 3rd party ones (unless they provide an integration with the 3rd party).

Check out

to find out what tools they offer about analytics.

If these are not sufficient for you, you'll need to contact Squarespace for help, requesting what features they are missing (possibly at a cost) and/or move to a traditional web host with either a custom content management system (e.g. WordPress) or a custom one, and maybe hire a web developer to implement an analytics system that has everything you need.

boen_robot
  • 1,450
  • 12
  • 24