@kattoshi/ngx-ga4
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@kattoshi/ngx-ga4", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": "kattoshi", | ||
@@ -15,4 +15,4 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@angular/common": "^14.0.0", | ||
"@angular/core": "^14.0.0" | ||
"@angular/common": ">=13.0.0", | ||
"@angular/core": ">=13.0.0" | ||
}, | ||
@@ -19,0 +19,0 @@ "dependencies": { |
# ngx-ga4 (Google Analytics4) | ||
Implementation for using Google Analytics 4 in angular14+ apps. | ||
Implementation for using Google Analytics 4 in angular13+ apps. | ||
@@ -11,3 +11,2 @@ # Notice | ||
## Setup | ||
====================== | ||
Specify the measurement ID in forRoot(). | ||
@@ -57,3 +56,3 @@ If omitted, specification can be delayed until initaize$() described later. | ||
``` | ||
----------------------------------------- | ||
-------------------- | ||
### 1. initalize$() | ||
@@ -68,3 +67,3 @@ Load the global site tag script into your project. | ||
==================== | ||
-------------------- | ||
### 2. js() | ||
@@ -79,3 +78,3 @@ ```ts | ||
==================== | ||
-------------------- | ||
### 3. config() | ||
@@ -89,3 +88,3 @@ ```ts | ||
==================== | ||
-------------------- | ||
### 4. configGroups() | ||
@@ -97,3 +96,3 @@ ```ts | ||
==================== | ||
-------------------- | ||
### 5. event() | ||
@@ -105,3 +104,3 @@ ```ts | ||
==================== | ||
-------------------- | ||
### 6. set() | ||
@@ -113,1 +112,16 @@ ```ts | ||
==================== | ||
## Directive | ||
### 1. gtagEvent | ||
```html | ||
<div gtagEvent draggable="true" trackOn="dragstart" action="product_dragged" [params]="{ event_label: 'Something draggable' }"> | ||
draggable | ||
</div> | ||
``` | ||
|item |type |description | ||
|----- |--------|------------------------------------------------ | ||
|trackOn|string |Specifies the event name of the DOM Element.<br>When an event ('dragstart' in the example) occurs, it will send the event to ga4. | ||
|action |string |ga4 event name. | ||
|params |object |event parameters. |
74994
120