Cache busting scripts are used with standard counters, which count all events, and unique counters, which count unique visitors.
Cache busting is not used with per session counters, which count unique users only once per session, because it's up to you to determine how sessions are counted and to pass a unique session ID to the Floodlight tag. Similarly, they're not used with sales tags, because the order ID that you pass to the tag already makes each request unique.
The following examples show what the code looks like for each cache busting option with Floodlight tags. If you're using image tags instead of Iframe tags for your Floodlight implementation, simply replace the Iframe tags shown below with your image tags.
Notice that the difference between each standard counter and unique counter of the same type is in how the ord= and num= key-values are used:
-
In standard counter tags, the
ord=key-value is used for the random number, and there's nonum=key-value. -
In unique counter tags, the
ord=key-value has a hard-coded value of1, and thenum=key-value is used for random number insertion.
JavaScript examples
Standard counterThe following example shows a JavaScript counter tag using the standard counting method, which counts each event.
The following example shows a JavaScript counter tag using the unique counting method, which counts the number of unique users per 24-hour period.
The following example shows an XHTML-compliant JavaScript counter tag using the standard counting method, which counts each event.
The following example shows an XHTML-compliant JavaScript counter tag using the unique counting method, which counts the number of unique users per 24-hour period.
ASP examples
Standard counterThe following example shows an ASP counter tag using the standard counting method, which counts each event.
<% Randomize() %>
The following example shows an ASP counter tag using the unique counting method, which counts the number of unique users per 24-hour period.
<% Randomize() %>
JSP examples
Standard counterThe following example shows a JSP counter tag using the standard counting method, which counts each event.
<% long random_number = (long) (Math.random()*100000000); %>
The following example shows a JSP counter tag using the unique counting method, which counts the number of unique users per 24-hour period.
<% long random_number = (long) (Math.random()*100000000); %>
PHP examples
Standard counterThe following example shows a PHP counter tag using the standard counting method, which counts each event.
$t= time() ?>
The following example shows a PHP counter tag using the unique counting method, which counts the number of unique users per 24-hour period.
$t= time() ?>
ColdFusion examples
Standard counterThe following example shows a ColdFusion counter tag using the standard counting method, which counts each event.
The following example shows a ColdFusion counter tag using the unique counting method, which counts the number of unique users per 24-hour period.