You can use the method below to start the tracking for a subscriber in one of your campaigns if you find it necessary to create custom code to send a webhook to Deadline Funnel. Please note that this only works for starting the deadline tracking, and isn't currently possible with sales tracking.
Attention: this topic and these instructions are for advanced users only who have the ability to create custom code and understand the concept of sending a POST request with a specific payload. It's a technical topic and very very few of our clients will ever need to use this method.
The basics are as follows:
You will get a custom URL using the steps outlined below
Your system or custom code (you create) will send a POST request to the URL
The POST request must contain the subscriber's email (details below)
When the POST is received, and assuming the information is correct in the payload, Deadline Funnel will create a tracking record for this subscriber
You must use the Deadline Funnel email links in your emails in order for the tracking to be accurate
How to Get the URL for your webhook POST
Go to Integrations > Select the campaign you want to integrate with and select 'New Integration':
Select 'Create Deadline Funnel Tracking' and hit 'Next':
Under email providers click 'More Email Providers' and select Custom, then hit 'Next':
Copy the webhook URL on the next page:
Sending the Subscriber Information to Deadline Funnel
Once you have the URL (using the steps above) you will need to POST the subscriber's email to that URL.
The raw body of the request should be formatted like so:
email=joe@gmail.com
Where joe@gmail.com should be replaced with the email address of the new subscriber.
Code Examples
In the following code examples, keep in mind:
The URL https://code.deadlinefunnel.com/listener/156892/custom/fc2e57f441 is being used as an example. Replace this placeholder with your actual URL. (See steps and screenshots above)
The email joe@gmail.com is being used as the subscriber's email. Replace this with the subscriber's actual email.
HTTP:
POST /listener/156892/custom/fc2e57f441 HTTP/1.1 Host: code.deadlinefunnel.com Cache-Control: no-cache email=joe@gmail.com
Javascript:
var data = "email=joe@gmail.com"; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("POST", "https://code.deadlinefunnel.com/listener/156892/custom/fc2e57f441"); xhr.setRequestHeader("Cache-Control", "no-cache"); xhr.send(data);
PHP:
<?php $request = new HttpRequest(); $request->setUrl('https://code.deadlinefunnel.com/listener/156892/custom/fc2e57f441'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'Cache-Control' => 'no-cache' )); $request->setBody('email=joe@gmail.com'); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; }
Remember:
Create your custom code to POST a webhook over to Deadline Funnel at the exact time you want tracking to start.
And you must use the Deadline Funnel email links in your emails leading up to the deadline. If you don't use our links, then the tracking won't be accurate.
Make sure that you are using the correct placeholder in the Deadline Funnel email links so that each subscriber's email has Deadline Funnel links with their actual email in the hyperlink.
If you have any questions, please let us know at help@deadlinefunnel.com or in our live chat at the bottom right of your screen |