usertrack
Add extra page access information to the "actions" field in the
TrackFile.
Summary
| Parameter
|
Description
|
Default
|
| tag |
Name of the extra action value to be logged. |
None |
| value |
Value logged with the action name. |
None |
Examples
Tag usage example
Assuming the value of the form variable "foo" is "bar":
Perl example
$Tag->usertrack({
tag => 'foo',
value => 'bar',
});
|
or similarly with positional parameters:
|
$Tag->usertrack('foo', 'bar');
|
Description
This tag can be used to add extra information to the "actions" field in the
TrackFile entry that corresponds with the
current page access request.
|
Note
If the TrackFile directive is not set up correctly
then this tag will not do anything useful.
|
A typical "actions" field value for a standard page access
looks like this:
A typical "actions" field value for a
"flypage" page
(see SpecialPage and PageSelectField)
access looks like this,
where the viewed SKU is "00-0010":
If the [usertrack] tag is used then extra information will be
added, as shown in the examples, below.
You may call the [usertrack] more than once on a single page.
Values used in multiple calls will be appended to the "actions" field
in sequence.
|
Warning
An "&" character will be used to separate the
default "actions" field value from extra actions specified using this
tag.
An "&" will also be used to separate multiple
extra actions,
if this tag is called more than once on a single page.
If you think that you might need to split the "actions" field into
individual actions and values then you will need to ensure that
the "&" character does not appear in either the
"tag" or the "value" parameter values.
|
Appending action(s) to ordinary pages
If the following is added to the "foobar" page:
then the following will be logged in the
TrackFile's "actions" field:
|
VIEWPAGE=foobar&EXTRA=kevin
|
Appending action(s) to the flypage
If the following is added to the "flypage" (see SpecialPage and PageSelectField)
and the "00-0010" code
(see DefaultTables) is viewed:
[usertrack EXTRA kevin]
[usertrack FOO bar]
|
then the following will be logged in the
TrackFile's "actions" field:
|
VIEWPROD=00-0010&EXTRA=kevin&FOO=bar
|
Parameters
tag
The name assigned to the extra "actions" field value.
value
The value logged with the action name.
See also