BatchCodeTableInitializer.#trackSearchWithGoogleAnalytics()
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -18,6 +18,7 @@ class BatchCodeTableInitializer {
|
||||
this.#countrySelect.addEventListener('change', event => this.#displayCountry());
|
||||
this.#displayCountry();
|
||||
this.#initializeHistogramView();
|
||||
this.#trackSearchWithGoogleAnalytics();
|
||||
}
|
||||
|
||||
#getCountry() {
|
||||
@@ -135,7 +136,8 @@ class BatchCodeTableInitializer {
|
||||
|
||||
#initializeHistogramView() {
|
||||
const thisClassInstance = this;
|
||||
$(`#${this.#batchCodeTableElement[0].id} tbody`).on(
|
||||
$(`#${this.#batchCodeTableElement[0].id} tbody`)
|
||||
.on(
|
||||
'click',
|
||||
'td.dt-control',
|
||||
function () {
|
||||
@@ -153,4 +155,19 @@ class BatchCodeTableInitializer {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#trackSearchWithGoogleAnalytics() {
|
||||
const thisClassInstance = this;
|
||||
$(`#${this.#batchCodeTableElement[0].id}`)
|
||||
.on(
|
||||
'search.dt',
|
||||
function () {
|
||||
gtag(
|
||||
'event',
|
||||
'view_search_results',
|
||||
{
|
||||
'search_term': thisClassInstance.#batchCodeTable.search()
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ jupyter notebook
|
||||
FK-FIXME:
|
||||
|
||||
FK-TODO:
|
||||
- add google captcha to batchCodeTable.html
|
||||
|
||||
anacron job:
|
||||
sudo cp src/intensivstationen_howbadismybatch.sh /etc/cron.daily/intensivstationen_howbadismybatch
|
||||
|
||||
Reference in New Issue
Block a user