Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

User Visit Logs



I am new to Portals. I would like to track a registered user's visit to a specific page. Does Portal offer any tracking out of the box? Otherwise, is there a way to capture the timestamp and the user's username into CDS upon page load?



Super User
Super User

Hi @yoggieb ,


Unfortunately, there is no OOTB already implemented. However, you can do it yourself:

  • if you want to store the data about users submitting something in the system you can add two fields to your entity - one lookup to a contact and another one datetime field and set those values on save using entity form metadata
  • if you want to have more analytics you can Azure Applications Insights or Google Analytics in the Portal. You can check out my blog post about using Azure Application Insights with Portal.
If you find this post helpful consider marking it as a solution to help others find it.

Hi @OOlashyn,


  1. Is it possible to capture the user name and timestamp without the user submitting the information?
  2. I did read an article about using Application Insights on Azure. I am not sure if the solution is free but I am unable to add the solution to my Azure account.

You can use Google Analytics instead - it is free. You can embed the tracking script the same way as for Azure Application Insights. You will need to use some JavaScript to send custom dimensions (ie username) to google analytics. Check out this docs about custom metrics in Google Analytics.

If you find this post helpful consider marking it as a solution to help others find it.

Thanks @OOlashyn. I will look into Google Analytics and see if it meets my needs.

Hi @OOlashyn,


I was able to get Google Analytics running on my portal. Traffic is being captured in Google Analytics, and I have a basic understanding of how custom dimensions work.


I am trying to capture the users (who they are), and the pages they are viewing. I could not figure how to capture the username in Portal as part of the custom dimension. Do you know how this can be achieved?

Hi @yoggieb ,


Please check out this official doc from Google. In short, after you configure your custom dimension in Admin Portal you need to update your tracking code.


First, you need to register your custom dimension:

gtag('config', 'GA_MEASUREMENT_ID', {
  'custom_map': {'dimension2': 'userId'}

Then you need to set it as soon as your user logs in

 {% if user %}
    gtag('event', 'age_dimension', {'userId': '{{user.Id}}'});
 {% endif %}

 You can replace Id field with any other field that you need from user object or any other valid liquid object or variable.

If you find this post helpful consider marking it as a solution to help others find it.

Thanks @OOlashyn. I will look into Google's documentation.

To answer the Azure App insight question, it provides free 5 GB of logging data per billing account per month, for a small/medium website that is a very large number. 

Also in general using an analytics provider is better in these scenarios since storing this data in CDS will be costly

Helpful resources

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Users online (6,830)