Book Image

Oracle APEX Cookbook : Second Edition

Book Image

Oracle APEX Cookbook : Second Edition

Overview of this book

Table of Contents (21 chapters)
Oracle APEX Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Counting clicks with apex_util.count_click


Sometimes you want to keep statistics on your web application, for example, to measure the level of interest in the application. Or you may want to log when a user clicks a certain link in the application. In that case, you could use the APEX_UTIL.COUNT_CLICK function. We will show you how to use this function in the following recipe.

Getting ready

We will create a section on a page, for example Page 1, with the latest news. Just a few words of the news article is displayed. Below the text is a link, [read more], which redirects the user to the complete news article. Make sure you have a page where you can create a news section.

How to do it...

  1. In the Application Builder, go to the page where you want to put the news section on.

  2. In the Regions section, click on the Add icon.

  3. Select PL/SQL dynamic content.

  4. Enter a title for the region, for example, news. Click on Next.

  5. In the PL/SQL source text area, enter the following code:

    declare
    cursor c_nws is
    select...