diff --git a/_config.yml b/_config.yml index ae4fe977..e1d8cc2c 100644 --- a/_config.yml +++ b/_config.yml @@ -83,7 +83,7 @@ social: # Analytics analytics: - provider : false # false (default), "google", "google-universal", "custom" + provider : false # false (default), "google", "google-universal", "google-gtag", "custom" google: tracking_id : diff --git a/_includes/analytics-providers/google-gtag.html b/_includes/analytics-providers/google-gtag.html new file mode 100644 index 00000000..31f2a696 --- /dev/null +++ b/_includes/analytics-providers/google-gtag.html @@ -0,0 +1,9 @@ + + + diff --git a/_includes/analytics.html b/_includes/analytics.html index 5448a506..371469f0 100644 --- a/_includes/analytics.html +++ b/_includes/analytics.html @@ -5,6 +5,8 @@ {% include /analytics-providers/google.html %} {% when "google-universal" %} {% include /analytics-providers/google-universal.html %} +{% when "google-gtag" %} + {% include /analytics-providers/google-gtag.html %} {% when "custom" %} {% include /analytics-providers/custom.html %} {% endcase %} diff --git a/docs/_docs/05-configuration.md b/docs/_docs/05-configuration.md index 8251ec60..67e5ca95 100644 --- a/docs/_docs/05-configuration.md +++ b/docs/_docs/05-configuration.md @@ -679,13 +679,14 @@ Analytics is disabled by default. To enable globally select one of the following | -------------------- | --------------------------------------------------------------- | | **google** | [Google Standard Analytics](https://www.google.com/analytics/) | | **google-universal** | [Google Universal Analytics](https://www.google.com/analytics/) | +| **google-gtag** | [Google Analytics Global Site Tag)](https://www.google.com/analytics/) | | **custom** | Other analytics providers | For Google Analytics add your Tracking Code: ```yaml analytics: - provider: "google-universal" + provider: "google-gtag" google: tracking_id: "UA-1234567-8" ```