Saving information across pages and domain names

Marketing Glossary

Market Ruler, LLC

Saving information across pages and domain names

ConversionRuler contains functionality to allow you to store and retrieve information about your visitors between pages on your site, and between web domains.

Contents

CRMemory_Set

Store a value in a memory slot.

CRMemory_Set(slot-index, value-to-store);

The CRMemory_Set call saves a value into memory slot memory_index. There are 16 slots available, and they are numbered zero through 15 (inclusive).

Example:

<script type="text/javascript">
    if (CR_QS('crsource')) {
       CRMemory_Set(0,'ppc');
    } else {
       CRMemory_Set(0,'organic');
    }
</script>

CRMemory_Get

Retrieve a value from a memory slot.

CRMemory_Get(slot-index, default-value);

The CRMemory_Get call retrieves a value from memory slot memory_index. There are 8 slots available, and they are numbered zero through 15 (inclusive). If the value is not available or is the "empty string", then this function returns the default-value, or null if default-value is not supplied.

Example:

<script type="text/javascript">
    if (CRMemory_Get(0) == 'organic') {
        document.write("As a special incentive, we are offering 5% off of your total order if you sign up now");
    }
</script>

CRMemory_Output

Retrieve a value from a memory slot and output it to the web page.

CRMemory_Output(slot-index, prefix, suffix, default-value);

This is useful for displaying memory values on to the page. This function will always output a hidden input value, and will use default-value when the slot-index memory slot is empty.

Example:

<script type="text/javascript">
CRMemory_Output(1,'<a href="http://','">Return to original domain</a>','www.example.com');
</script>

CRMemory_HiddenInput

Retrieve a value from a memory slot and output a hidden form field to be included in a Web form.

CRMemory_HiddenInput(slot-index, input-name, default-value);

Generates the HTML for a hidden input value, such as:

<input type="hidden" name="input-name" value="memory-value" />

This is useful for incorporating memory values into forms. This function will always output a hidden input value, and will use default-value when the slot-index memory slot is empty.

Example:

<form action="signup.asp" method="post">
    <label><input type="text" name="email" value="" />Email</label>
    <label><input type="text" name="first_name" value="" />First Name</label>
    <label><input type="text" name="last_name" value="" />Last Name</label>
    <script type="text/javascript">CRMemory_HiddenInput(0,'campaign_type','none');</script>
</form>

Magic memory globals

The following global variables will automatically be "set" when defined prior to the inclusion of our Tracking Snippet:

This allows you to record values by simply defining a global variable prior to where our Tracking Snippet is placed on a page, e.g.

<script type="text/javascript">
  var CRMemory_0 = 'dude@example.com';
  var CRMemory_1 = document.location.host;
</script>
...
<!-- ConversionRuler Track Script BEGIN -->
<script type="text/javascript">
... ConversionRuler tracking script here ...
</script>
<!-- ConversionRuler Track Script END -->
Jump to: navigation, search