Submit a Ticket My Tickets
Login  Sign up

A Guide to the CAKE Lead Posting Document

This article will cover:

What is the Lead Posting Document?

A Lead Posting Document provides instructions on how to post leads to CAKE. It also shows all possible form fields and related information, such as required fields, field types (text, number, etc.), and more. A Posting Document can be dispersed to an affiliate or used to configure the form on your hosted landing page.

When an affiliate uses a form to server post leads to you, the Posting Document provides your affiliate with a Campaign ID and Key which allows them access to post leads into CAKE. When an affiliate redirects click traffic to your landing page (where you collect the lead data), the posting document enables you to set up browser posting from the landing page to CAKE.

The Posting Document can be generated from the Home tab of the Vertical, Offer, or Campaign cards. 


The Lead Posting Document will default to "Server Post" but you can select your Posting Method from the drop-down on the top right of the page.

How to Post Leads via Server Post 

The Server Post option is most commonly used when an Affiliate is posting leads directly to CAKE and will require the Affiliate to pass the Campaign ID and Key for authorization and attribution. 

The Campaign ID (ckm_campaign_id) is a unique value assigned to the Affiliate for the Campaign the Posting Document is referencing. The Key (ckm_key) is a unique password assigned to the Affiliate for this Campaign.

The standard CAKE Posting Documents discusses Server posting leads into CAKE via HTTP GET/POST, however, CAKE also supports server posting via 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]/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.

How to Post Leads via Browser HTTP Post

The Browser HTTP Post option will most commonly be used when you are hosting the landing page and form that affiliates are driving click traffic to via a CAKE Tracking link.

Unlike the Server Post, the Browser HTTP Post will require that a hidden field called “ckm_offer_id” be hardcoded in the post string.

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.

How to Post Leads via Browser AJAX Post 

The Browser AJAX Post type allows you to utilize the Client Side Validation option on lead submission, where the consumer will be prompted to validate/update a form field if it does not match the validation type, a required field for example. 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, however, 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, the CAKE 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.

The Responses from CAKE will be slightly different from 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.

How to Post Leads via Session Post

Normally if you have a hosted form that's accepting and posting leads from multiple affiliates you would use a browser post.  Although the browser post only includes the Offer ID (as opposed to a server post which references a campaign ID indicating both affiliate and offer), CAKE recognizes the affiliate from the cookie placed on the user's machine when the click occurs.


But what happens if the cookie is lost (or becomes unavailable) before the post is made?

OR if a web page posts to a different server (say an internal DB) and that server posts to CAKE which means that we can't reference the browser cookie?  CAKE is unable to attribute the lead to an affiliate and instead attributes the lead to the default (internal) affiliate account.


With the above situation, you could use a server post to ensure the lead gets attributed back to the correct affiliate, however, this requires the form to intuitively change the campaign ID and post key every time it posts from a different source.

Since that's usually difficult to accomplish, CAKE offers an alternative: a session post.

A session post is a browser post that mimics a server post by including our request ID in an additional parameter.  The request ID will tie the post to the originating click, even without the aid of browser cookies.

Read more here on Session Post-implementation.

How to Send a Test Post

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 hardcoded to the page.

The Browser AJAX Post will specify form id=“ckm_form” as well.

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.

The fourth section of the Posting Document outlines the possible Responses that CAKE will send after a lead has been submitted.

The most important response the Affiliate will want to take note of is our “Success” response.

You may also be interested in:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.