Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (25 loc) · 659 Bytes

page_views.md

File metadata and controls

31 lines (25 loc) · 659 Bytes

Page Views

Page views tracking works like Google Analytics.

Image

In order to start using it you can use preregistered twig function:

<!DOCTYPE html>
<html lang="{{ app.request.locale }}">
    <head>
        ...
        {{ app_insights_php() }}
    </head>
    <body>
        ...
    </body>
</html>

If you want to identify your metrics by logged users you can also pass username/userid optional id to this function

{% if app.user %}
    {{ app_insights_php(app.user.username) }}
{% else %}
    {{ app_insights_php() }}
{% endif %}