How to Start a Click

TSL Ping Tree > How To

How to Start a Click

We call the start of a visit or session in your account in our network a "Click".  We provide several ways to start a Click prior to a "Submit" (a.k.a. Form Submission) so that you can track events associated with a single visit and you can measure Click-to-Submit ratios, Earnings Per Click (EPC), Cost Per Click (CPC), etc.

You do not have to concern yourself with how our clicks work if you do not have affiliates sending you traffic and you do not care about accurate tracking, however, we do not recommend that you do so.

Front Sites

When you operate the website that the visitor (a.k.a. user or prospect or lead) sees and interacts with, or when you drive traffic to your affiliates' such websites, then we call each such site a "Front Site".  In order to have accurate tracking on a Front Site you will need to get a Click ID from your account in our network to go with the start of every visit on your Front Site, and you will need to pass that ID back to us for every form submission that you do.

We provide a working example of how to do Front Site tracking using only plain HTML and JavaScript where the tracking is about 97% accurate.  It's not perfect because it depends on the browser allowing both JavaScript and cookies.  If you just wish to get up and running quickly without striving for perfection then you can use this technique as-is without any programming knowledge.  The example is posted here: http://www.techsavvyleads.com/TrackingExample.zip

To implement 100% accurate tracking you will need to do some server-side coding and state management on your Front Site using the following services.

  1. Click Thru.  Use this service when you wish to send traffic to a page on your website (or your affiliates' websites) from links in email marketing, banners, ads, e.g.  The service will issue a tracking cookie and redirect to one of your specified landing pages (where we recommend that you use our token feature to pass yourself the assigned Click ID value, e.g. https://www.myleadgensite.com/?c=${sp.Click ID} -- this is done in each URL of the URL Set that you define and attach to your Promotion).

    First configure a Promotion to have one or more landing pages such as https://www.myleadgensite.com/?c=${sp.Click ID}.  Next encode your links that will pass through your account in our network as:

    http(s)://YOURSUBDOMAIN.tslpingtree.net/clickthru.ashx?s=SITE_ID&p=PROMOTION_ID&a=AFFILIATE_ID&s1=SUBID1&s2=SUBID2&s3=SUBID3

    e.g. https://mysubdomain.tslpingtree.net/clickthru.ashx?s=myleadgensite.com&p=1001&a=af1234&s1=123456

    s = Site ID – A recommended but optional 36 character ID that distinguishes the source of the visitor.  Any alphanumeric value is valid but the recommendation is to use the domain name of a website without its "http(s)://www." prefix such that if pasted into a modern web browser one would see the source website where the visitor completed the form.

      For a headless website the affiliate will control this value.

      For a front site the recommendation is to pick the domain name that gets the most traffic even if you are split testing landing pages across domain names.  This is helpful to use if you use the same Promotion ID across multiple front sites because it separates all TSL Ping Tree cookies so that cookies for one Site ID are not used across front sites.

    p = Promotion ID – A required 36 character ID that corresponds to a promotion that you have configured via the TSL Ping Tree website. Promotions determine landing pages and/or payout terms.

    a = Affiliate ID – An optional 36 character ID that distinguishes the party that is to be paid for any traffic conversions. Any alphanumeric value is valid and reports are available to determine payout amounts by Affiliate ID.

    s1, s2, & s3 = Sub IDs – Optional 36 character IDs that you or your affiliates can use to identify search keywords, IDs from third party tracking systems, e.g.

    lp = specific landing page URL – not shown above but valid, you may specify any URL to be the landing page. Be sure to URL Encode this URL as you would any other URL parameter's value.


  2. Get Click.  Use this service to track organic traffic.  You will want to do this in addition to our or instead of our Click Thru service so that you always get a Click ID from our network and store it in a session (or use some other state management option to store it) whenever a visitor arrives on your website.

    Our Get Click Service responds by default with an XML formatted response.  There is also a lighter-weight JSON variation.

    All parameters of the Click Thru Service documented above apply to the Get Click Service as well.  In addition parameter c=CLICK_ID is supported so that you can use a combination of Click Thru and Get Click to maximize your tracking accuracy.  That is to say, if you already have a Click ID from our network stored in your session then pass it to us via the c parameter in the call to the Get Click Service so that we do not generate another Click ID.

    We also support System Parameter parameter "ip" as the visitor's IP Address (a.k.a. Browser IP Address or Consumer IP Address).  We strongly recommend that you capture this value on your end and pass it along with your Get Click requests so that the visitor's IP address will be associated with the Click and not just your web server's IP address.

    Here is an example of an HTTP GET call for the Get Click service (although we recommend that you do a POST; GET is just easier for us to illustrate in this documentation):

    http(s)://YOURSUBDOMAIN.tslpingtree.net/getclick.ashx?s=SITE_ID&p=PROMOTION_ID&a=AFFILIATE_ID&s1=SUBID1&s2=SUBID2&s3=SUBID3&c=CLICK_ID&ip=VISITOR_IP_ADDRESS

    c = Click ID – Use this parameter to avoid duplicate Click IDs when you are keeping track of our Click ID via your own session management techniques.

    ip = Visitor IP Address – capture the visitor's IP Address and pass it along to our network to avoid duplicate Click IDs when you are keeping track of our Click ID via your own session management techniques.

    The XML response will be structured as follows and no cookies will be returned.

    <Click>
        <ClickId>1120375</ClickId>
        <SiteId>SITE_ID</SiteId>
        <PromotionId>PROMOTION_ID</PromotionId>
        <AffiliateId>AFFILIATE_ID</AffiliateId>
        <SubId1>SUBID1</SubId1>
        <SubId2>SUBID2</SubId2>
        <SubId3>SUBID3</SubId3>
        <LandingPage>http://www.MySuperDuperSpecialOfferWebsite.com/Home.html?c=1120375</LandingPage>
    </Click>

    If any errors occurred in the call then there will also be a GeneralErrors tag that contains one or more GeneralError tags detailing those errors, e.g.

    <GeneralErrors>

        <GeneralError>PromotionId is required</GeneralError>

    </GeneralErrors>

    In addition, if the given promotion pays on a Pay Per Click basis then there will also be a PayoutId tag and an optional tracking pixel in a Pixel tag.  For more about these payout tags see help article How to Submit a Lead.


    Note:  If you prefer JavaScript Object Notation (JSON) over XML for your Get Click response format then add "type=json" to your Get Click call.  The returned value will be "TSLProcessAjaxClickResponse({"ClickId":123456789});" e.g.  Notice that only the Click ID is returned and that none of the other tags that are part of the XML response format are returned.


Headless Sites

When you and/or your affiliates post pre-validated leads directly to some ping tree in your account and there is only one opportunity for an accept, decline, or error (versus on a Front Site where a visitor may correct errors and resubmit, e.g.) then we call each instance a "Headless Site".  You provide posting specifications to affiliates for Headless Sites; use our Generate Posting Specification report to do so.

A ping tree for a Headless Site should be set up to respond with XML that contains a disposition of accept, decline, or error (as opposed to issuing an HTTP Redirect).  It should also populate your duplicate tables so that subsequent posts of this same lead are not processed again (at least in a short period of time which you may specify when defining a Duplicate Rule).

So as far as a Click goes there is nothing to do for a Headless Site.  Each Submit will start a new Click such that you will always have a 100% Click-to-Submit ratio for the given promotion and ping tree combination.


See also: