Home > APEX_UTIL > COUNT_CLICK Procedure
Previous |
Next |
This procedure counts clicks from an application built in Application Builder to an external site. You can also use the shorthand version, procedure Z
, in place of APEX_UTIL
.COUNT_CLICK
.
Syntax
APEX_UTIL.COUNT_CLICK ( p_url IN VARCHAR2, p_cat IN VARCHAR2, p_id IN VARCHAR2 DEFAULT NULL, p_user IN VARCHAR2 DEFAULT NULL, p_workspace IN VARCHAR2 DEFAULT NULL);
Parameters
Table: COUNT_CLICK Parameters describes the parameters available in the COUNT_CLICK
procedure.
COUNT_CLICK Parameters
Parameter | Description |
---|---|
|
The URL to which to redirect |
|
A category to classify the click |
|
Secondary ID to associate with the click (optional) |
|
The application user ID (optional) |
|
The workspace associated with the application (optional) |
Example
The following example demonstrates how to use the COUNT_CLICK procedure to log how many user's click on the http://yahoo.com
link specified. Note that once this information is logged, you can view it via the APEX_WORKSPACE_CLICKS view and in the reports on this view available to workspace and site administrators.
DECLARE l_url VARCHAR2(255); l_cat VARCHAR2(30); l_workspace_id VARCHAR2(30); BEGIN l_url := 'http://yahoo.com'; l_cat := 'yahoo'; l_workspace_id := TO_CHAR(APEX_UTIL.FIND_SECURITY_GROUP_ID('MY_WORKSPACE')); HTP.P('<a href=APEX_UTIL.COUNT_CLICK?p_url=' || l_url || '&p_cat=' || l_cat || '&p_workspace=' || l_workspace_id || '>Click</a>'); END;
See Also: "FIND_SECURITY_GROUP_ID Function" in this document and "Purging the External Click Count Log" in Oracle Application Express Administration Guide |