Skip to content

Commit db707b5

Browse files
committed
Pageswap events for GA, FA version numbers updated, CF7 listing sort improvement, set cookie function improvement
#2286
1 parent 9b5aee6 commit db707b5

File tree

18 files changed

+69
-50
lines changed

18 files changed

+69
-50
lines changed

.github/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nebula-wp",
33
"title": "Nebula",
44
"description": "Advanced Starter WordPress Theme for Developers",
5-
"version": "11.11.18.453",
5+
"version": "11.11.27.777",
66
"homepage": "https://gearside.com/nebula/",
77
"repository": {
88
"type": "git",

Nebula-Child/assets/css/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Nebula-Child/resources/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//BEGIN automated edits. These will be automatically overwritten.
22
const THEME_NAME = 'nebula-child';
3-
const NEBULA_VERSION = 'v11.11.18.453'; //Thursday, April 18, 2024 10:52:19 AM
3+
const NEBULA_VERSION = 'v11.11.27.777'; //Saturday, April 27, 2024 6:38:37 PM
44
const OFFLINE_URL = 'https://nebula.gearside.com/offline/';
55
const OFFLINE_IMG = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/offline.svg';
66
const META_ICON = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/meta/android-chrome-512x512.png';

Nebula-Child/style.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/admin.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/critical.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/login.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/pre.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/modules/helpers.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ nebula.helpers = async function(){
6969
nebula.dom.document.on('keydown', function(e){
7070
if ( e.key === 'Escape' ){
7171
nebula.dom.document.trigger('esc'); //Trigger a simpler DOM event. Is this helpful?
72-
73-
//Close modals
74-
jQuery('.modal').modal('hide');
72+
jQuery('.modal').modal('hide'); //Close modals
7573
}
7674
});
7775

assets/js/modules/measure.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,29 @@ nebula.eventTracking = async function(){
175175

176176
nebula.attributionTracking();
177177

178+
//When a pageswap happens via the View Transition API
179+
nebula.dom.document.on('pageswap', function(event){
180+
if ( event.viewTransition ){ //Ignore if a view transition did not actually occur
181+
gtag('event', 'pageswap', {
182+
event_category: 'View Transition',
183+
event_action: 'Page Swap',
184+
event_label: 'From ' + event.oldURL + ' to ' + event.newURL,
185+
location: event.newURL,
186+
old_url: event.oldURL,
187+
new_url: event.newURL
188+
});
189+
}
190+
});
191+
178192
//When the page is restored from BFCache (which means it is not fully reloaded)
179193
window.addEventListener('pageshow', function(event){
180194
if ( event.persisted === true ){
181-
//Send another pageview if the page is restored from bfcache
182-
gtag('event', 'page_view', {
183-
type: 'bfcache'
195+
//When the page is restored from bfcache
196+
gtag('event', 'bfcache', {
197+
event_category: 'Back/Forward Cache',
198+
event_action: 'Restored',
199+
event_label: event.target.location.href,
200+
location: event.target.location.href
184201
});
185202
}
186203
});

0 commit comments

Comments
 (0)