---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/direct/doc/en/best-practice/check-changes.md
  - https://yandex.ru/dev/direct/doc/ru/best-practice/check-changes.md
  - href: en/best-practice/check-changes.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/dg/best-practice/check-changes.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/en/llms.txt

# Tracking changes

Information received from the server should be cached (in a local database, in memory, in files on a disk, and so on). This includes parameters of campaigns, groups, ads, and keywords, as well as reference lists of regions and time zones. 

You should not get objects from the server again, unless they have actually changed. To check for changes, use the methods for the [Changes](https://yandex.com/dev/direct/doc/changes/changes.html) service:

- [checkDictionaries](https://yandex.com/dev/direct/doc/changes/checkDictionaries.html) — Informs you if reference lists have changed.
- [checkCampaigns](https://yandex.com/dev/direct/doc/changes/checkCampaigns.html) — Informs you if client campaigns have changed.
- [check](https://yandex.com/dev/direct/doc/changes/check.html) — Informs you if a client's campaigns, groups, and ads have changed.

{% note info %}

Changes to keywords are considered changes in a group.

{% endnote %}

We recommend using these methods in the following way:

1. At the first launch of the app, call the [CheckDictionaries](https://yandex.com/dev/direct/doc/changes/checkDictionaries.html) method without the `Timestamp` parameter in order to synchronize the current time.

   The method returns the `Timestamp` parameter, which is the current UTC time on the server.

1. In each subsequent method call, indicate the value of the `Timestamp` parameter that you received in the previous call. This guarantees that there will be no gaps between the intervals for checking for changes, regardless of possible delays or discrepancies between the time on the server and the time in the app.

If you need to check for changes in all campaigns, groups, and ads for a client:

1. Use the [CheckCampaigns](https://yandex.com/dev/direct/doc/changes/checkCampaigns.html) method to check which campaigns have changes.

   The method returns the IDs of the campaigns that were changed. The `ChangesIn` parameter specifies where the changes were made:

   - `SELF`: In the campaign's parameters.
   - `CHILDREN`: In child objects: ad groups, ads, or keywords.
   - `STAT`: Campaign statistics adjusted (usually due to filtering out fraudulent clicks).

1. If the method showed that there were changes in the campaign's child objects (the CHILDREN value), use the [check](https://yandex.com/dev/direct/doc/changes/check.html) method to get the IDs of the changed objects. To do this, indicate the campaign ID in the `CampaignIds` input array, and the AdGroupIds and AdIds values in the `FieldNames` input array.

If the response indicates changes, get current data by using the `get` method for the corresponding services — [AdGroups](https://yandex.com/dev/direct/doc/adgroups/adgroups.html) or [Ads](https://yandex.com/dev/direct/doc/ads/ads.html).
