nxc_view_from_ga
Last updated: Thursday 18 September 2025 16:55
UNIX name |
Owner |
Status |
nxc_view_from_ga |
7x |
stable
|
Version |
Compatible with |
N/A
|
N/A
|
Update views count from google analytics
nxc_view_from_ga
Update views count from google analytics
INSTALLING:
-
Create "Service account" at https://code.google.com/apis/console and enable "Analytics API" service, after creating account you need to download and include private key file.
1a. Add "service_email" as new user in you google analytics account.
- Set client_id, service_email, path_to_key and profile_id for your Google Analytics account in settings file, section [General] -> variable GAData.
- Specify classes and parent nodes list which should be updated.
- Specify AttributeIdentifier, where visits count should be storred. This identifier should have type Integer for correct fetches.
- Install cronjob "php runcronjobs.php -s siteadmin ga_views".
-
You can also specify IncludeCountsPattern array in settings file which allow to combine visits.
For example IncludeCountsPattern[gallery]=(offset).* will set visits count for all urls like "/gallery/test-gallery", "/gallery/test-gallery/(offset)/0", "/gallery/test-gallery/(offset)/1" etc.