# Activity Tracking

## Overview

The PushSDK provides methods that allow you to track the type of content a subscriber is viewing within your application. This information can then be used in the Pushly platform to create cohorts of subscribers that have visited specific URLs  or screens with tags based on the number of visits and visit recency.

For example: "Subscribers who have visited a page/screen tagged with "Astrology" at least 4 times in the last 30 days".

## Methods

### UserProfile.trackActivity

To track a URL or screen visited along with its keyword/tag metadata:

{% tabs %}
{% tab title="Dart" %}

```dart
await PushSDK.UserProfile.trackActivity('myapp://dashboard', ['my-tag']);
```

{% endtab %}
{% endtabs %}

Or if there are no tags to be provided pass an empty `tags` parameter:

{% tabs %}
{% tab title="Dart" %}

```dart
await PushSDK.UserProfile.trackActivity('myapp://sports/article-1', []);
```

{% endtab %}
{% endtabs %}
