Skip to content

Commit 7b47b09

Browse files
author
Chris Gårdenberg
committed
refactor: Change of slug from eduadmin-google to eduadmin-analytics.
1 parent 2576b55 commit 7b47b09

7 files changed

Lines changed: 44 additions & 21 deletions

File tree

Gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ gulp.task("readme-version", function () {
2121

2222
gulp.task("plugin-version", function () {
2323
return gulp
24-
.src("src/eduadmin-google.php")
24+
.src("src/eduadmin-analytics.php")
2525
.pipe(replace("$PLUGINVERSION$", pinfo.version))
2626
.pipe(replace("$PLUGINATLEAST$", pinfo.config.eduadmin.requiresAtLeast))
2727
.pipe(replace("$PLUGINTESTEDTO$", pinfo.config.eduadmin.testedUpTo))
@@ -33,7 +33,7 @@ gulp.task("plugin-version", function () {
3333

3434

3535
gulp.task("default", function () {
36-
gulp.watch("src/eduadmin-google.php", gulp.series("plugin-version"));
36+
gulp.watch("src/eduadmin-analytics.php", gulp.series("plugin-version"));
3737
gulp.watch("src/readme.*", gulp.series("readme-version"));
3838
gulp.watch(
3939
"package.json",

class/class-edu-google.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class EDUGTAG_Google extends EDU_Integration {
99
public function __construct() {
1010
parent::__construct();
1111

12-
$this->id = 'eduadmin-google';
13-
$this->displayName = __( 'Google Analytics / Tag Manager', 'eduadmin-google' );
14-
$this->description = __( 'Plugin to enable more advanced Google Analytics / Tag Manager integration', 'eduadmin-google' );
12+
$this->id = 'eduadmin-analytics';
13+
$this->displayName = __( 'Google Analytics / Tag Manager', 'eduadmin-analytics' );
14+
$this->description = __( 'Plugin to enable more advanced Google Analytics / Tag Manager integration', 'eduadmin-analytics' );
1515
$this->type = 'plugin';
1616

1717
$this->init_form_fields();
@@ -27,7 +27,7 @@ public function __construct() {
2727
add_action( 'eduadmin-programme-bookingform-view', array( $this, 'track_programme_booking_view' ) );
2828
add_action( 'eduadmin-booking-completed', array( $this, 'track_booking_completed' ) );
2929

30-
add_shortcode( 'eduadmin-google-testpage', array( $this, 'test_page' ) );
30+
add_shortcode( 'eduadmin-analytics-testpage', array( $this, 'test_page' ) );
3131
}
3232

3333
/**
@@ -37,21 +37,21 @@ public function __construct() {
3737
public function init_form_fields() {
3838
$this->setting_fields = [
3939
'enabled' => [
40-
'title' => __( 'Enabled', 'eduadmin-google' ),
40+
'title' => __( 'Enabled', 'eduadmin-analytics' ),
4141
'type' => 'checkbox',
42-
'description' => __( 'Enable Google Analytics / Tag Manager integration', 'eduadmin-google' ),
42+
'description' => __( 'Enable Google Analytics / Tag Manager integration', 'eduadmin-analytics' ),
4343
'default' => 'no',
4444
],
4545
'google-tag-manager' => [
46-
'title' => __( 'Google Tag Manager ID', 'eduadmin-google' ),
46+
'title' => __( 'Google Tag Manager ID', 'eduadmin-analytics' ),
4747
'type' => 'text',
48-
'description' => __( 'The ID of the Google Tag Manager', 'eduadmin-google' ),
48+
'description' => __( 'The ID of the Google Tag Manager', 'eduadmin-analytics' ),
4949
'default' => '',
5050
],
5151
'google-tag' => [
52-
'title' => __( 'Google Tag ID', 'eduadmin-google' ),
52+
'title' => __( 'Google Tag ID', 'eduadmin-analytics' ),
5353
'type' => 'text',
54-
'description' => __( 'The ID of the Google Tag', 'eduadmin-google' ),
54+
'description' => __( 'The ID of the Google Tag', 'eduadmin-analytics' ),
5555
'default' => '',
5656
],
5757
];
@@ -392,7 +392,7 @@ public function test_page( $attributes ): string {
392392

393393
return '<pre>' . print_r( $ebi, true ) . '</pre>';
394394
} else {
395-
return __( 'No booking with that ID was found.', 'eduadmin-google' );
395+
return __( 'No booking with that ID was found.', 'eduadmin-analytics' );
396396
}
397397

398398
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Author: Chris Gårdenberg, MultiNet Interactive AB
1515
* Author URI: https://www.multinet.com
1616
* License: GPL3
17-
* Text Domain: eduadmin-google
17+
* Text Domain: eduadmin-analytics
1818
* Domain Path: /languages/
1919
*/
2020
/*
@@ -42,7 +42,7 @@ function EDUGTAG_checkForEduAdminPlugin() {
4242
add_action( 'admin_notices', function () {
4343
?>
4444
<div class="error">
45-
<p><?php esc_html_e( 'This plugin requires the EduAdmin-WordPress-plugin to be installed and activated.', 'eduadmin-google' ); ?></p>
45+
<p><?php esc_html_e( 'This plugin requires the EduAdmin-WordPress-plugin to be installed and activated.', 'eduadmin-analytics' ); ?></p>
4646
</div><?php
4747
} );
4848
deactivate_plugins( plugin_basename( __FILE__ ) );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "eduadmin-google",
2+
"name": "eduadmin-analytics",
33
"version": "1.0.0",
44
"description": "This plugin adds support for Google Analytics / Tag Manager to your EduAdmin plugin (WordPress only, not the course portal).",
55
"repository": "https://github.com/MultinetInteractive/eduadmin-google.git",

readme.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
=== EduAdmin - Google Analytics / Tag Manager ===
2+
Contributors: mnchga
3+
Tags: booking, participants, courses, events, eduadmin, lega online, google, analytics, tag manager
4+
Requires at least: 5.8
5+
Tested up to: 6.4
6+
Stable tag: 1.0.0
7+
Requires PHP: 7.0
8+
License: GPL3
9+
License-URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10+
This plugin adds support for Google Analytics / Tag Manager to your EduAdmin plugin (WordPress only, not the course portal).
11+
12+
== Description ==
13+
14+
# EduAdmin - Google Analytics / Tag Manager WordPress
15+
16+
This plugin adds support for Google Analytics / Tag Manager to your [EduAdmin-Wordpress plugin](https://github.com/MultinetInteractive/EduAdmin-WordPress).
17+
18+
The plugin will add javascript to your website that will send events to Google Analytics / Tag Manager when a user interacts with the booking form.
19+
20+
The domain of the javascript will be from https://www.googletagmanager.com, and you can find their terms of service here:
21+
https://www.google.com/analytics/terms/tag-manager/
22+
23+
This plugin requires that you're using the [EduAdmin-Wordpress plugin](https://wordpress.org/plugins/eduadmin-booking/)

scripts/github-deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ if [[ -z "$GITHUB_REF" ]]; then
1616
fi
1717

1818

19-
PLUGIN="eduadmin-google"
19+
PLUGIN="eduadmin-analytics"
2020
PROJECT_ROOT=$GITHUB_WORKSPACE
21-
VERSION="$(cat $PROJECT_ROOT/eduadmin-google.php | grep Version: | head -1 | cut -d: -f2 | tr -d '[[:space:]]')"
21+
VERSION="$(cat $PROJECT_ROOT/eduadmin-analytics.php | grep Version: | head -1 | cut -d: -f2 | tr -d '[[:space:]]')"
2222

2323
echo "Version: $VERSION of $PLUGIN"
2424

@@ -84,5 +84,5 @@ rm -fR svn
8484

8585
curl -X POST \
8686
-H 'Content-type: application/json' \
87-
--data '{"username": "GitHub Actions", "channel":"#wordpress-eduadmin", "icon_url": "https://slack-files2.s3-us-west-2.amazonaws.com/avatars/2017-12-19/288981919427_f45f04edd92902a96859_512.png","text": "EduAdmin Google plugin version '"$VERSION"' deployed to <https://sv.wordpress.org/plugins/eduadmin-google/|wp.org> :tada:"}' \
87+
--data '{"username": "GitHub Actions", "channel":"#wordpress-eduadmin", "icon_url": "https://slack-files2.s3-us-west-2.amazonaws.com/avatars/2017-12-19/288981919427_f45f04edd92902a96859_512.png","text": "EduAdmin Google plugin version '"$VERSION"' deployed to <https://sv.wordpress.org/plugins/eduadmin-analytics/|wp.org> :tada:"}' \
8888
$SLACK_HOOKURL
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Author: Chris Gårdenberg, MultiNet Interactive AB
1515
* Author URI: https://www.multinet.com
1616
* License: GPL3
17-
* Text Domain: eduadmin-google
17+
* Text Domain: eduadmin-analytics
1818
* Domain Path: /languages/
1919
*/
2020
/*
@@ -42,7 +42,7 @@ function EDUGTAG_checkForEduAdminPlugin() {
4242
add_action( 'admin_notices', function () {
4343
?>
4444
<div class="error">
45-
<p><?php esc_html_e( 'This plugin requires the EduAdmin-WordPress-plugin to be installed and activated.', 'eduadmin-google' ); ?></p>
45+
<p><?php esc_html_e( 'This plugin requires the EduAdmin-WordPress-plugin to be installed and activated.', 'eduadmin-analytics' ); ?></p>
4646
</div><?php
4747
} );
4848
deactivate_plugins( plugin_basename( __FILE__ ) );

0 commit comments

Comments
 (0)