Difference between revisions of "Tracking Landings and Actions (JavaScript)"
Line 59: | Line 59: | ||
The '''cr_track''' function was previously called '''tlitrack''' and has since been renamed. The '''tlitrack''' call will be supported forever. | The '''cr_track''' function was previously called '''tlitrack''' and has since been renamed. The '''tlitrack''' call will be supported forever. | ||
− | == See also | + | == See also == |
* [http://conversion.marketruler.com/setup/codegen.php ConversionRuler Code Generator] | * [http://conversion.marketruler.com/setup/codegen.php ConversionRuler Code Generator] | ||
* [[JavaScript]] | * [[JavaScript]] |
Revision as of 02:29, 19 July 2011
The cr_track call in ConversionRuler is the primary function which records all of the information about the current page being viewed and sends it to our Web Servers.
Contents
Recording values with your Conversion Actions
You can pass up to four text values and four amounts to ConversionRuler to be stored along with the action that a visitor has taken.
The text values are for recording order numbers, email addresses, or anything you want to store about a particular visitor or action.
The amounts are for recording order amounts, taxes, shipping charges, or anything you want to store and view in total for a particular visitor or action.
To do so, specify the values you wish to record as global variables prior to invoking ConversionRuler's cr_track function:
var cramount0 = '$452.22'; var crtext0 = 'ORDER5124125123123'; var crtext1 = 'john@example.com'; cr_track(3);
The syntax of this function is:
cr_track(action_code)
Note that the first parameter is optional, but unless an action code is specified, the amount and text values will be ignored.
Recorded values
The following global variables are available to record order amounts or order numbers, or any other information related to the action being recorded:
- cramount or cramount0
- cramount1
- cramount2
- cramount3
- crtext or crtext0
- crtext1
- crtext2
- crtext3
Note that cramount and cramount0 are synonyms. If, for some reason, both are specified, then the value for cramount is recorded, and cramount0 is ignored.
Likewise, crtext will be recorded, and crtext0 will be ignored if both are specified on the page.
Very important: Landings do not record amounts or text. To record the amount0...3 and the text0...3 values, you must specify an Action Code in the cr_track call.
See also
Deprecated Functionality: Passing values in the cr_track call
Because passing 9 variables to a function is error prone, this means of recording action data is deprecated.
The syntax of this function is:
cr_track(action_code, amount0, text0, amount1, text1, amount2, text2, amount3, text3)
Note that all parameters are optional.
- action_code - To record landings, specify an empty string '' or the number zero ("0"). Otherwise, this is the Action Code which corresponds to the Conversion Action you'd like to record.
- amount0, amount1, etc. - To record order amounts, subtotals, or any numeric information which will be summed up in reports, specify amounts in the positions above.
- text0, text1, etc. - To record any string to be associated
Deprecated Functionality: tlitrack
The cr_track function was previously called tlitrack and has since been renamed. The tlitrack call will be supported forever.