commit
305371c794
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [2.2.1](https://github.com/ckan/ckanext-googleanalytics/compare/v2.2.0...v2.2.1) (2023-01-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* adapt event_tracking.js to gtag` ([924bc71](https://github.com/ckan/ckanext-googleanalytics/commit/924bc71a33dce4e846df9ce77f1ba1036f9dc788))
|
||||||
|
|
||||||
## [2.2.0](https://github.com/ckan/ckanext-googleanalytics/compare/v2.1.1...v2.2.0) (2022-12-03)
|
## [2.2.0](https://github.com/ckan/ckanext-googleanalytics/compare/v2.1.1...v2.2.0) (2022-12-03)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,16 @@ ckan.module("google-analytics", function(jQuery, _) {
|
||||||
|
|
||||||
var resource_url = encodeURIComponent(jQuery(this).prop("href"));
|
var resource_url = encodeURIComponent(jQuery(this).prop("href"));
|
||||||
if (resource_url) {
|
if (resource_url) {
|
||||||
|
if (typeof ga === "undefined") {
|
||||||
|
gtag('event', "Download", {
|
||||||
|
'event_category': "Resource",
|
||||||
|
'event_label': resource_url,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
ga("send", "event", "Resource", "Download", resource_url);
|
ga("send", "event", "Resource", "Download", resource_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = ckanext-googleanalytics
|
name = ckanext-googleanalytics
|
||||||
version = 2.2.0
|
version = 2.2.1
|
||||||
description = Add GA tracking and reporting to CKAN instance
|
description = Add GA tracking and reporting to CKAN instance
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
long_description_content_type = text/markdown
|
long_description_content_type = text/markdown
|
||||||
|
|
Loading…
Reference in New Issue