effective_pages 3.16.1 → 3.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62b279de7e9162e7c6382b0b93f180d784dd9c6180df99d36aa3bfb5ed66dc72
4
- data.tar.gz: f09090fb7ee98fd51fd47a8a5d270f97a1ceadf6e897465e3ea251c31f23ce19
3
+ metadata.gz: '089c9fb2dab6ed22b60cbaae0025de51e642ce360a3100367273f4ab88a19e1e'
4
+ data.tar.gz: a365d1e792831e329556cb69ee38a0ac24f6fc7bdc2ea402d122391d9e024536
5
5
  SHA512:
6
- metadata.gz: 19d5f2fcf3e31e88ae78a9d86299f17db604a37b530d2e9cd2917a9a7ae29818aa69726bcef635c764df0453309b44189762a1956d75714ac4d4096516bbd41b
7
- data.tar.gz: 61f5d72a7caacc399264c0e2ec458afee547794cc4918e2ce47591728bad0f9fdafd1955a4da38bb0085517c8527ea0302bdf018ac1989b4cebc0f5cce2b8880
6
+ metadata.gz: 4bc4e654af2f040643097d18675c948e921aa1809e6180ee9396b73cadfd3b189350e9b37c20fc4daa63eba1455a666503c453252b60d550c2453718c5ffe8e2
7
+ data.tar.gz: c8de57d906b00320f9f57b0610c9440e1ae3d78a403a3f516b8a3db769236e16bb55d6464da471d0ef3f98c87b485fcad5ce54bf5265bbb3bde268ccc246d60f
@@ -1,5 +1,5 @@
1
1
  // Add Google Analytics Code
2
- // Supports Turbolinks and Turbo
2
+ // Supports Turbolinks
3
3
  document.addEventListener("turbolinks:load", function(event) {
4
4
  if(typeof(gtag) != 'function') { return }
5
5
 
@@ -9,3 +9,14 @@ document.addEventListener("turbolinks:load", function(event) {
9
9
  page_path: location.href.replace(location.origin, "")
10
10
  });
11
11
  })
12
+
13
+ // Supports Turbo
14
+ document.addEventListener("turbo:load", function(event) {
15
+ if(typeof(gtag) != 'function') { return }
16
+
17
+ gtag('event', 'page_view', {
18
+ page_title: document.title,
19
+ page_location: event.detail.url,
20
+ page_path: location.href.replace(location.origin, "")
21
+ });
22
+ })
@@ -25,7 +25,7 @@ module Effective
25
25
  flash.now[:warning] = [
26
26
  'Hi Admin!',
27
27
  ('You are viewing a draft page.' unless @page.published?),
28
- ("<a href='#{effective_pages.edit_admin_page_path(@page)}' class='alert-link' data-turbolinks='false'>Click here to edit this page</a>.")
28
+ ("<a href='#{effective_pages.edit_admin_page_path(@page)}' class='alert-link' data-turbolinks='false' data-turbo='false'>Click here to edit this page</a>.")
29
29
  ].compact.join(' ')
30
30
  end
31
31
 
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.16.1'.freeze
2
+ VERSION = '3.17.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.16.1
4
+ version: 3.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect