Welcome to WebmasterWorld Guest from

Forum Moderators: keyplyr & mack

Message Too Old, No Replies

Source Code Question

For Affiliate Sales Tracking

6:45 pm on Jun 19, 2013 (gmt 0)

New User

joined:June 19, 2013
posts: 1
votes: 0

Howdy, I'm new here and not very tech savvy. Much appreciated if you can shed some light on this issue. Mods, if this is in the wrong subforum, my apologies and feel free to move it.

I am an affiliate of Agoda; it's a hotel site very popular in Asia.

They said if you want to make sure you will be getting credit for sales then test it by checking the source code one you reach the landing page if trying to book a hotel.

Sometimes both the OldCID with our correct 7 digit code appears AND also a CID with the correct 7 digit code.

Other times the OldCID is there but the CID (customer ID) is just-1 and not our entire 7 digit number.

Do you think we will get credit for sales under the second scenario?

I'll give a snippet of the very long code for both scenarios but will substitute x's for our 7 digit customer iD number.

Scenario 1 where I know we'll get paid:


Scenario 2 which I'm worried about:


I really have no idea if this sort of coding is common or not for tracking affiliate sales.

It'd be much appreciated if anyone could shed some light on this issue. Thanks!
11:10 pm on June 25, 2013 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Apr 30, 2008
votes: 191

cid of -1 would usually imply "there is no cid" as -1 is often used when a parameter does not have a value/does not exist.

What you need to distinguish is under what circumstances your cid would be set to -1, e.g. what did you do differently navigating the site and clicking on the affiliate link.

The -1 is probably set to prevent the same visitor that clicks to Agoda from (lets say) two of your pages counting twice (or to prevent the visitor clicking twice on the same affiliate link and being double counted) - this depends on your T&C with them.

Where are you checking "view source" from? I am a bit unclear whether it is your site or their landing page. If it is their landing page, can't you just check the URL in the address bar? If it is your "view source" then it is your site that creates the link - is this under your control or perhaps you use their plugin/js/frame or something?

What I think you need to do is identify what is exactly the difference between clicks that have the full cid and clicks that have -1, for example, have you clicked on affiliate link before, so the second time around gives you -1 or similar.