Skip to content

Commit f943153

Browse files
authored
Merge pull request #126 from xwp/feature/ga4-with-attribution
Add INP to GA4 with LoAF attribution
2 parents eb70ebc + ee4313e commit f943153

18 files changed

+111
-987
lines changed

README.md

+5-27
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,6 @@ The plugin must be configured by setting the `site_performance_tracker_vitals` t
2020

2121
To send Web Vitals metrics to Google Analytics in a format compatible with the [Web Vitals Report](https://web-vitals-report.web.app), enable the following theme support and passing in the ID:
2222

23-
[Google Analytics (analytics.js)](https://support.google.com/analytics/answer/7476135) is supported, requires passing the ID using `ga_id`:
24-
25-
```php
26-
add_theme_support( 'site_performance_tracker_vitals', array(
27-
'ga_id' => 'UA-XXXXXXXX-Y',
28-
) );
29-
```
30-
31-
[Global Site Tag](https://support.google.com/analytics/answer/1008080) is supported, requires passing the Analytics ID (starting with `UA-` not `GTM-`) using `gtag_id`:
32-
33-
```php
34-
add_theme_support( 'site_performance_tracker_vitals', array(
35-
'gtag_id' => 'UA-XXXXXXXX-Y',
36-
) );
37-
```
38-
3923
[GA4 Analytics](https://support.google.com/analytics/answer/9304153) is supported, requires passing the ID using `ga4_id`:
4024

4125
```php
@@ -44,17 +28,6 @@ add_theme_support( 'site_performance_tracker_vitals', array(
4428
) );
4529
```
4630

47-
If you need to override the Google Analytics dimensions (defaults to `dimensions1` through `dimension3`) to store these under, pass them along on the add theme support initialisation:
48-
49-
```php
50-
add_theme_support( 'site_performance_tracker_vitals', array(
51-
'gtag_id' => 'UA-XXXXXXXX-Y',
52-
'measurementVersion' => 'dimension7',
53-
'eventMeta' => 'dimension8',
54-
'eventDebug' => 'dimension9',
55-
) );
56-
```
57-
5831
The following hooks can be added to a theme or a custom plugin to configure the plugin, alternatively you can configure the plugin through the settings screen, in case of duplication, plugin will take programmatically set settings. To confirm they were applied look for the `webVitalsAnalyticsData` global variable in the page source.
5932

6033
### Limit the number of events sent
@@ -99,6 +72,11 @@ All contributions are welcome! Please create [an issue](https://github.com/xwp/s
9972

10073
### Changelog
10174

75+
#### 1.3.3 - October 30th, 2023
76+
77+
- Deprecated GA3 support.
78+
- Used attribution build of web vitals.
79+
10280
#### 1.3.2 - October 30th, 2023
10381

10482
- Improved admin interface for GA4.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => 'fce1f2f2d706b26fa13d359ef5102663');
1+
<?php return array('dependencies' => array(), 'version' => 'df22e0939b3993085571f1a1e05ab969');

js/dist/module/web-vitals-analytics.df22e0939b3993085571f1a1e05ab969.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)