CheckURLParam- reads any parameter from the requested address, CheckCookie- any cookie. Both consist of the same three tags with the same tasks.
The pattern in three steps
The difference between DataOK and Data
Both can be used as area tags, and they check different things.The difference shows with a parameter without a value. With the address
…/?flag=, CheckURLParam-DataOK applies because the parameter is there. CheckURLParam-Data does not apply because there is no value after it. For the question “was this parameter passed”, use DataOK; for “does it contain a value”, use Data.Reading URL parameters
CheckURLParam-TouchData()
Specifies which parameter of the requested address is read. The name goes in the parentheses.Getting the name from another tag
CheckURLParam-TouchData() supports tag-in-tag. The parameter name can therefore come from another tag.
Reading cookies
CheckCookie-TouchData()
Specifies which cookie is read.A cookie whose value is in quotation marks is recognised correctly. The quotation marks themselves are not part of the value. The shop removes trailing spaces from a value without quotation marks.
Using external input safely
Both groups output values that the visitor determines themselves. Anyone can change the address, and the cookie as well.For output in running text, this is uncritical: the shop outputs the values HTML-encoded, so an injected element is displayed as text and not executed.
This is the usual pattern: read in the external value once, check it against the expected values, and only then do something. Anything that does not fit the list is silently ignored.
The tags at a glance
All six tags are permitted on all templates.
Related topics
- Reference: Design Control tags
- Materials: Cookies used
- Guide: Tracking advertising success with Referer and SubReferer
