usertrack — append usertrack entry with arbitrary key=value pair
| Attribute | Pos. | Req. | Default | Description |
|---|---|---|---|---|
| tag | Yes | Yes | Key name | |
| value | Yes | Key value | ||
| interpolate | 0 | interpolate output? | ||
| hide | 0 | Hide the tag return value? |
The tag is used to append content to the line that will be inserted into user tracking log.
Key/value pairs are added to the line in "GET"-like style. See the section called “EXAMPLES”.
Example: Basic example
Put each of the two lines anywhere on a page:
[usertrack HELLO WORLD] [usertrack tag=test_var value=test_value]
Example: Recording the number of cart items each time the user visits the index page
Put the following in index.html:
[usertrack tag=nitems value="[nitems]"]
Interchange 5.9.0:
Source: code/UserTag/usertrack.tag
Lines: 12
# Copyright 2002-2007 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
# $Id: usertrack.tag,v 1.5 2007-03-30 23:40:57 pajamian Exp $
UserTag usertrack Order tag value
UserTag usertrack Version $Revision: 1.5 $
UserTag usertrack Routine sub { $Vend::Track->user(@_) if $Vend::Track; }