Clicking on linkfield to open URL and also save Auditing data into database

Certified Associate Developer

In our project, we have a requirement to audit the link clicks from Appian Page.

We would like to store the user, datatime, link Clicked etc. information in a database table and also same time open the URL.

 OR

If Google Analytics link tracking can be used here? If anyone used it?
support.google.com/.../1136920

 

=a!linkField(
  label: "Links",
  links: a!safeLink(
    label: "Company web site",
    uri: "http://www.appian.com"
  )
)

I do not see any option to make DB call to save to database?


  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Unfortunately, there isn’t a straightforward way to achieve this directly in Appian, so I used a combination of Web APIs, Integrations, and JavaScript to make it work.

    Step 1:

    Use a Web API in your save link and pass the necessary link information as a parameter.

    Step 2:

    Within the Web API:

    • Call an Integration that writes the data to the database.
    • Include JavaScript logic to launch the target page.

    Below is a sample outline of the logic used.

    "<html>
    <script>
    window.open('" & www.google.com & "', '_self')
    </script>
    <body>
    'Redirecting to target system'
    </body>
    </html>"





Reply
  • 0
    Certified Senior Developer

    Unfortunately, there isn’t a straightforward way to achieve this directly in Appian, so I used a combination of Web APIs, Integrations, and JavaScript to make it work.

    Step 1:

    Use a Web API in your save link and pass the necessary link information as a parameter.

    Step 2:

    Within the Web API:

    • Call an Integration that writes the data to the database.
    • Include JavaScript logic to launch the target page.

    Below is a sample outline of the logic used.

    "<html>
    <script>
    window.open('" & www.google.com & "', '_self')
    </script>
    <body>
    'Redirecting to target system'
    </body>
    </html>"





Children
No Data