shimmer 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shimmer/version.rb +1 -1
- data/src/consent.ts +3 -1
- data/src/controllers/analytics.ts +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36f3761e1bd5856a9fd2078201abda25b544eff5e807566ce85847ba291c47d9
|
4
|
+
data.tar.gz: c946f2ec830a472aee08d835dbb697711d46c107152723ee8f9bb43a36bc4173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8bb839595c9e32ab185276bdaac0c8a6f43b4ce1fb1ce0d82d47a1c18c5ae082e29caa68c34d14856db2ebb2001fe4774f5b687599b794706d199767bd46de1
|
7
|
+
data.tar.gz: 885c2bdb0326b02c3eebd7d4606d79906b52264ef8b6043dc6f4061dffd6c8b5a786af22f9d25378d7aa21988a34d6412409adcd7acb6acce7f478e342323eba
|
data/lib/shimmer/version.rb
CHANGED
data/src/consent.ts
CHANGED
@@ -53,12 +53,14 @@ export class Consent {
|
|
53
53
|
role: ConsentCategory = "statistic"
|
54
54
|
): Promise<void> {
|
55
55
|
await this.consentFor(role);
|
56
|
+
window.gtag("js", new Date());
|
56
57
|
window.gtag("config", id);
|
57
58
|
const script = document.createElement("script");
|
59
|
+
script.async = true;
|
58
60
|
script.setAttribute(
|
59
61
|
"src",
|
60
62
|
`https://www.googletagmanager.com/gtag/js?id=${id}`
|
61
63
|
);
|
62
|
-
document.head.
|
64
|
+
document.head.prepend(script);
|
63
65
|
}
|
64
66
|
}
|
@@ -12,12 +12,13 @@ declare global {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
const dataLayer = (window.dataLayer = window.dataLayer ?? []);
|
15
|
-
|
16
|
-
|
17
|
-
//
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
function gtag(): void {
|
16
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
17
|
+
// @ts-ignore
|
18
|
+
// eslint-disable-next-line prefer-rest-params
|
19
|
+
dataLayer.push(arguments);
|
20
|
+
}
|
21
|
+
window.gtag = gtag;
|
21
22
|
|
22
23
|
export default class extends Controller {
|
23
24
|
connect(): void {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ravens
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|