<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://help.marketruler.com/index.php?action=history&amp;feed=atom&amp;title=CR.data</id>
		<title>CR.data - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://help.marketruler.com/index.php?action=history&amp;feed=atom&amp;title=CR.data"/>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=CR.data&amp;action=history"/>
		<updated>2026-04-28T16:52:57Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://help.marketruler.com/index.php?title=CR.data&amp;diff=1432&amp;oldid=prev</id>
		<title>Admin at 17:22, 14 November 2018</title>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=CR.data&amp;diff=1432&amp;oldid=prev"/>
				<updated>2018-11-14T17:22:22Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:22, 14 November 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; __CR.data = function (name, value) { ... }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; __CR.data = function (name, value) { ... }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The '''name''' is the exact name of the variable to store. The '''value''' is a simple string, object, or numeric value to store. Values which are arbitrarily large (such as objects or deep structures) should be avoided as they can cause issues with servers which reject cookies which grow beyond a certain size limit. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The '''name''' is the exact name of the variable to store &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and can be a string or scalar value. The '''name''' is converted to a string before usage&lt;/ins&gt;. The '''value''' is a simple string, object, or numeric value to store. Values which are arbitrarily large (such as objects or deep structures) should be avoided as they can cause issues with servers which reject cookies which grow beyond a certain size limit. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Getting a data value ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Getting a data value ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://help.marketruler.com/index.php?title=CR.data&amp;diff=1431&amp;oldid=prev</id>
		<title>Admin at 16:49, 14 November 2018</title>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=CR.data&amp;diff=1431&amp;oldid=prev"/>
				<updated>2018-11-14T16:49:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:49, 14 November 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;__CR.data&amp;lt;/span&amp;gt; is a function which takes two parameters and gets or sets values within the current page's domain. Data is available on any page which shares cookies with the current domain, and data values are generally stored in a cookie called &amp;lt;code&amp;gt;__cr_state&amp;lt;/code&amp;gt; and encoded using [[JSON]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;__CR.data&amp;lt;/span&amp;gt; is a function which takes two parameters and gets or sets values within the current page's domain. Data is available on any page which shares cookies with the current domain, and data values are generally stored in a cookie called &amp;lt;code&amp;gt;__cr_state&amp;lt;/code&amp;gt; and encoded using [[JSON]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Getting and setting data is intended for small bits of data, generally storing form values which are limited in length and other state values related to the current tracking of the visitor. Data values are stored as [[Name-Value]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pairs&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Getting and setting data is intended for small bits of data, generally storing form values which are limited in length and other state values related to the current tracking of the visitor. Data values are stored as [[Name-Value &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Pair&lt;/ins&gt;]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;s&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Setting a data value ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Setting a data value ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://help.marketruler.com/index.php?title=CR.data&amp;diff=1429&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;span class=&quot;code&quot;&gt;__CR.data&lt;/span&gt; is a function which takes two parameters and gets or sets values within the current page's domain. Data is available on any page which shar...&quot;</title>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=CR.data&amp;diff=1429&amp;oldid=prev"/>
				<updated>2018-11-14T16:48:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;__CR.data&amp;lt;/span&amp;gt; is a function which takes two parameters and gets or sets values within the current page&amp;#039;s domain. Data is available on any page which shar...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;__CR.data&amp;lt;/span&amp;gt; is a function which takes two parameters and gets or sets values within the current page's domain. Data is available on any page which shares cookies with the current domain, and data values are generally stored in a cookie called &amp;lt;code&amp;gt;__cr_state&amp;lt;/code&amp;gt; and encoded using [[JSON]].&lt;br /&gt;
&lt;br /&gt;
Getting and setting data is intended for small bits of data, generally storing form values which are limited in length and other state values related to the current tracking of the visitor. Data values are stored as [[Name-Value]] pairs.&lt;br /&gt;
&lt;br /&gt;
== Setting a data value ==&lt;br /&gt;
&lt;br /&gt;
 __CR.data = function (name, value) { ... }&lt;br /&gt;
&lt;br /&gt;
The '''name''' is the exact name of the variable to store. The '''value''' is a simple string, object, or numeric value to store. Values which are arbitrarily large (such as objects or deep structures) should be avoided as they can cause issues with servers which reject cookies which grow beyond a certain size limit. &lt;br /&gt;
&lt;br /&gt;
== Getting a data value ==&lt;br /&gt;
&lt;br /&gt;
  __CR.data = function (name) { ... }&lt;br /&gt;
&lt;br /&gt;
The name is the exact name of the variable to retrieve. If not found, &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; is returned.&lt;br /&gt;
&lt;br /&gt;
== Deleting a data value ==&lt;br /&gt;
&lt;br /&gt;
 __CR.data(name, null)&lt;br /&gt;
&lt;br /&gt;
Deletes the data with name '''name''' if it exists. &lt;br /&gt;
&lt;br /&gt;
== Example usage - saving and recording an email address on two pages ==&lt;br /&gt;
&lt;br /&gt;
On the form page:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;&lt;br /&gt;
 window._crq = window._crq || [];&lt;br /&gt;
 window._crq.push(function (cr) {&lt;br /&gt;
 	cr.jquery(function ($) {&lt;br /&gt;
 		var &lt;br /&gt;
 		save_email = function () {&lt;br /&gt;
 			cr.data(&amp;quot;email&amp;quot;, $(this).val());&lt;br /&gt;
 		};&lt;br /&gt;
 		$('input[type=email],input.email').on(&amp;quot;change&amp;quot;, save_email).each(save_email);&lt;br /&gt;
 	});&lt;br /&gt;
 });&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The above code will only be functional on a page which contains a [[ConversionRuler Tracking Snippet]].'''&lt;br /&gt;
&lt;br /&gt;
On the form thank you page:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;&lt;br /&gt;
 window._crq = window._crq || [];&lt;br /&gt;
 window._crq.push(function (cr) {&lt;br /&gt;
 	cr.track('thank-you', null, cr.data('email'));&lt;br /&gt;
 });&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The above code will only be functional on a page which contains a [[ConversionRuler Tracking Snippet]].'''&lt;br /&gt;
&lt;br /&gt;
Note that the above should be customized for the type of elements targeted by [[jQuery]] as well as the action code names, depending on your installation.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:ConversionRuler JavaScript Functions|JavaScript Functions]]&lt;br /&gt;
* [[__CR.cookie]]&lt;br /&gt;
* [[__CR.query]]&lt;br /&gt;
* [[__CR.jquery]]&lt;br /&gt;
* [[Tracking Queue]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ConversionRuler]]&lt;br /&gt;
[[Category:ConversionRuler JavaScript Functions]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>