Posting Documents and Methods
This article will cover the following:
- General Posting Document Information
- Server Post
- Browser HTTP Post
- Browser AJAX Post
General Posting Document Information
Posting Documents can be found from either the Vertical card > Home tab or the Offer card > Home tab of Hosted or Host-n-Post offers.
Lead Posting Instruction pages will always default to "Server Post" but you can select your Posting Method from the drop-down on the top right of the page.
1. Posting URL / Posting Instructions
The second section of the Posting Document is where the Affiliate can find either the Posting URL for Server Posts or the Posting Instructions for Browser Posts.
The Posting URL will show an example post string containing all required fields for that Vertical or Offer.
The Browser HTTP Post requires the Post URL, ckm_offer_id along with a Form Action to be hard coded to the page.
The Browser AJAX Post will specify form id=“ckm_form” as well.
2. Posting Tests
The Affiliate may notify CAKE that a specific lead is a “Test”. The third section of the Posting Document outlines two possible methods for accomplishing this.
The value “ckm_test=1” can be added to the post string.
Passing “ckmtest” in either “first_name”, “last_name” or “address” will accomplish this as well.
Server Post Document
The Server Post option is most commonly used when an Affiliate is posting leads directly to CAKE.
The Server Post option will ALWAYS require ckm_campaign_id and ckm_key.
The ckm_campaign_id is a unique value assigned to the Affiliate for the offer the Posting Document is referencing.
The ckm_key is a unique password assigned to the Affiliate for this campaign.
Server Posting via XML
The standard CAKE Posting Documents discusses Server posting leads into CAKE via HTTP GET/POST, however CAKE also supports one other Server post method... XML.
The Field setup details and Post URL will be the same as shown on the posting doc, however the following will also be required in order to post in XML formatted leads:
- Authentication parameters ckm_campaign_id and ckm_key must be included in the Post URL query string parameters, NOT within the XML body.
- Append the parameter "ckm_xml=1" to the Post URL: http://[tracking domain here.com]/d.ashx?ckm_xml=1&ckm_campaign_id=123&ckm_key=abc
- A root XML element is required. To satisfy this requirement, add the node <XML> at the beginning of the XML and then </XML> at the end
- Field names need to be converted into individual XML nodes within the root element e.g: <f_name>Bob</f_name> etc.
Any errors within the XML will result in the Affiliate receiving an error: "Invalid XML Format", otherwise a standard server post XML response will be returned and the lead will be processed normally by CAKE.
Browser HTTP Post Document
The Browser HTTP Post option will be used when users are redirected to the hosted landing page through a CAKE Unique Link.
Unlike the Server Post, the Browser HTTP Post will require that a hidden field called “ckm_offer_id” be hard coded on the landing page.
CAKE will track which Affiliate drove the traffic to the landing page through the click of the CAKE Unique Link. This is why CAKE does not require a campaign_id like the Server Post.
Browser AJAX Post Document
This option is for more advanced users as it will require more programming functions.
The set up of the HTTP AJAX Post is virtually identical to the HTTP Browser Post except for a couple of items.
The Offer ID will still be required and hard coded to the landing page.
The Posting Instructions now specify form id=“ckm_form”
Two AJAX scripts will need to be placed on the page you would like to do the validation.
Additionally, our AJAX library must be added to the landing page as well. It is this script that opens the communication between CAKE and your hosted landing page.
AJAX Responses & Customization
The Responses from CAKE will be slightly different with the Browser AJAX Post.
Unlike the XML Response one can expect from the other methods, a "Success" will simply result in the user being redirected to the specified Thank You Link located on the Offer card.
Likewise, an error message will also be different from the other Post methods.
An error will result in an error message displayed to the user. The various messages that the hosted landing page shows can be customizable.
The last section of the Browser AJAX Posting Document will list out possible customizations.