Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Google Tag Manager support #1468

Merged
merged 3 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ function ($input) {
}
);

register_setting(
'site_settings_group', // option_group
'google_tag_manager_id',
function ($input) {
return sanitize_text_field($input);
}
);

// add fields GENERAL
add_settings_field(
'blogname', // id
Expand Down Expand Up @@ -358,6 +366,17 @@ function ($input) {
'label_for' => 'analytics_id'
]
);

add_settings_field(
'google_tag_manager_id', // id
__('Google Tag Manager id', 'cds-snc'), // title
array($this, 'googleTagManagerCallback'), // callback
'collection-settings-admin', // page
'collection_settings_section_analytics', // section
[
'label_for' => 'google_tag_manager_id'
]
);
}

public function collectionModeCallback($args)
Expand Down Expand Up @@ -479,6 +498,15 @@ public function analyticsCallback()
<?php
}

public function googleTagManagerCallback()
{
$googleTagManagerId = get_option("google_tag_manager_id", "");
?>
<input name="google_tag_manager_id" type="text" id="google_tag_manager_id" class="regular-text"
value="<?php echo esc_attr($googleTagManagerId); ?>">
<?php
}


public function collectionMaintenancePageCallback()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/806.213ea476.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message name":[""],"Send message to a list":[""],"Name is required":["Le nom est requis"],"Edit email message":[""],"Your recipients will not see this message name.":[""],"Subject line of the email":[""],"Tell recipients what the message is about. Try to keep it shorter than 10 words.":[""],"Subject is required":[""],"Message":[""],"Message is required":[""],"Save template":[""],"Delete this message template":[""]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/806.213ea476.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message name":["Nom du message"],"Send message to a list":["Envoyer un message \u00e0 une liste"],"Name is required":["Le nom est requis"],"Edit email message":[""],"Your recipients will not see this message name.":[""],"Subject line of the email":[""],"Tell recipients what the message is about. Try to keep it shorter than 10 words.":[""],"Subject is required":[""],"Message":[""],"Message is required":[""],"Save template":[""],"Delete this message template":[""]}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/431.99d242f4.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"There is a problem":["Un probl\u00e8me s\u2019est produit"],"Message preview":["Aper\u00e7u du message"],"Subject":["Sujet"],"The message was sent to the the subscribers in the list below.":["Le message a \u00e9t\u00e9 envoy\u00e9 aux abonn\u00e9s de la liste ci-dessous."],"Sending to:":["Envoi \u00e0 :"],"Message sent":["Message envoy\u00e9"],"Send a new message":["Envoyer un nouveau message"],"Return to messages":["Retour aux messages"],"Create a new list.":["Cr\u00e9er une nouvelle liste."],"A subscriber list allows you to collect a group of subscribers that you can send a message to.":["Une liste d'abonn\u00e9s vous permet de rassembler un groupe d'abonn\u00e9s auxquels vous pouvez envoyer un message."],"Send to list?":["Envoyer \u00e0 la liste ?"],"warning":["alerte"],"Yes send it":["Oui, envoyez-le"],"No, cancel":["Non, annuler"],"Send message to a list":["Envoyer un message \u00e0 une liste"],"Subscriber list":["Liste des abonn\u00e9s"],"Choose a group to send this message to.":["Choisissez un groupe auquel envoyer ce message."],"Send message":["Envoyer un message"]}}}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/BlocksPHP\/src\/subscribe\/edit.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Subscribe form settings":["Param\u00e8tres du formulaire d\u2019abonnement"],"Email field label":["\u00c9tiquette du champ adresse courriel"],"Subscribe button label":["\u00c9tiquette du bouton S\u2019abonner"],"List":["Liste"],"Privacy policy link":["Lien de confidentialit\u00e9"]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/BlocksPHP\/src\/subscribe\/edit.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Subscribe form settings":["Param\u00e8tres du formulaire d\u2019abonnement"],"Email field label":["\u00c9tiquette du champ adresse courriel"],"Subscribe button label":["\u00c9tiquette du bouton S\u2019abonner"],"List":["Liste"],"Privacy policy link":["Lien de confidentialit\u00e9"]}}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/BlocksPHP\/build\/subscribe\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Subscribe form settings":["Param\u00e8tres du formulaire d\u2019abonnement"],"Email field label":["\u00c9tiquette du champ adresse courriel"],"Subscribe button label":["\u00c9tiquette du bouton S\u2019abonner"],"List":["Liste"],"Privacy policy link":["Lien de confidentialit\u00e9"]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/BlocksPHP\/build\/subscribe\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Subscribe form settings":["Param\u00e8tres du formulaire d\u2019abonnement"],"Email field label":["\u00c9tiquette du champ adresse courriel"],"Subscribe button label":["\u00c9tiquette du bouton S\u2019abonner"],"List":["Liste"],"Privacy policy link":["Lien de confidentialit\u00e9"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/536.014c49cb.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message Name":[""],"Message type":[""],"Last modified":[""],"Edit":[""],"Delete":[""],"Send Template":["Envoyer le mod\u00e8le"],"Messages":[""],"Create Template":[""],"Message templates":[""],"Showing":[""],"of":[""],"previous":[""],"next":[""]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/536.014c49cb.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message Name":["Nom du message"],"Message type":["Type de message"],"Last modified":["Derni\u00e8re modification"],"Edit":["Modifier"],"Delete":["Supprimer"],"Send Template":["Envoyer le mod\u00e8le"],"Messages":["Messages"],"Create Template":["Cr\u00e9er un mod\u00e8le"],"Message templates":["Mod\u00e8les de messages"],"Showing":["Montrer"],"of":["de"],"previous":["pr\u00e9c\u00e9dent"],"next":["suivant"]}}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/958.f540b6f4.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Go back":["retourner"]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/958.f540b6f4.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Go back":["retourner"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/74.543d198a.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message Name":[""],"Message type":[""],"Last modified":[""],"Edit":[""],"Delete":[""],"Send Template":["Envoyer le mod\u00e8le"],"Messages":[""],"Create Template":[""],"Message templates":[""],"Message name":[""],"Date sent":[""],"List name":[""],"Sender":[""],"Sending History":[""],"Showing":[""],"of":[""],"previous":[""],"next":[""],"All message templates":[""],"All sending history":[""]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/74.543d198a.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message Name":["Nom du message"],"Message type":["Type de message"],"Last modified":["Derni\u00e8re modification"],"Edit":["Modifier"],"Delete":["Supprimer"],"Send Template":["Envoyer le mod\u00e8le"],"Messages":["Messages"],"Create Template":["Cr\u00e9er un mod\u00e8le"],"Message templates":["Mod\u00e8les de messages"],"Message name":["Nom du message"],"Date sent":["Date d'envoi"],"List name":["Nom de la liste"],"Sender":["Envoyeur"],"Sending History":["Historique des envois"],"Showing":["Montrer"],"of":["de"],"previous":["pr\u00e9c\u00e9dent"],"next":["suivant"],"All message templates":["Tous les mod\u00e8les de messages"],"All sending history":["Tous les historiques d'envoi"]}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/569.4568d616.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Name":["Nom"],"Go back":["retourner"],"Required Field":["Champs requis"],"Name is required":["Le nom est requis"],"List type":["Type de liste"],"Type is required":["Le type est requis"],"Subscribe template id":["ID de gabarit pour l'abonnement"],"See example template ID format.":["Voir l'exemple de format d'ID de mod\u00e8le."],"Unsubscribe template id":["ID de gabarit pour la d\u00e9sinscription"],"Subscribe redirect url":["le lien de redirection apr\u00e8s souscription"],"Unsubscribe redirect url":["le lien de redirection apr\u00e8s d\u00e9sinscription"],"Confirm redirect url":["Le lien pour ridection apr\u00e8s confirmation"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/528.1e3e09a5.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message name":[""],"Date sent":[""],"List name":[""],"Sender":[""],"Sending History":[""],"Showing":[""],"of":[""],"previous":[""],"next":[""],"Sending history":[""]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"classes\/Modules\/ListManager\/app\/build\/static\/js\/528.1e3e09a5.chunk.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Message name":["Nom du message"],"Date sent":["Date d'envoi"],"List name":["Nom de la liste"],"Sender":["Envoyeur"],"Sending History":["Historique des envois"],"Showing":["Montrer"],"of":["de"],"previous":["pr\u00e9c\u00e9dent"],"next":["suivant"],"Sending history":["Historique des envois"]}}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.6.0","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Dashboard":["Tableau de bord"],"Visit":["Visiter"],"Email":["Adresse courriel"],"Success":["Op\u00e9ration r\u00e9ussie"],"Internal server error":["Erreur interne du serveur"],"Warning":["Avis"],"Add user":["Ajouter un utilisateur"],"Accordion":["Accord\u00e9on"],"Title":["Titre"],"Settings":["Param\u00e8tres"],"Alert Type":["Type d\u2019alerte"],"Info":["Information"],"Danger":["Danger"],"Alert":["Alerte"],"Summary":["Sommaire"],"Expander":["D\u00e9compresseur"],"Show \u201cRead More\u201d":["Afficher \u00ab En savoir plus \u00bb"],"Latest Page":["La page la plus r\u00e9cente"],"Latest Article":["L\u2019article la plus r\u00e9cente"]," Tables exist from deleted sites":["Des tables existent \u00e0 partir de sites supprim\u00e9s"],"Date":["Date"],"User agent":["Agent utilisateur"],"current":["actuel"],"Name":["Nom"],"Website":["Site Web"],"Admin":["Administrateur"],"Success!":["Op\u00e9ration r\u00e9ussie!"],"There is a problem":["Un probl\u00e8me s\u2019est produit"],"Select one":["S\u00e9lectionner parmi les choix"],"Invite a user to collaborate on your GC Articles collection.":["Inviter un utilisateur \u00e0 collaborer sur votre site Articles GC."],"Role":["R\u00f4le"],"Confirmation type":["Type de confirmation"],"Welcome":["Bienvenue"],"Default":["par d\u00e9faut"]}}}
{"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.7.1","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Dashboard":["Tableau de bord"],"Visit":["Visiter"],"Email":["Adresse courriel"],"Success":["Op\u00e9ration r\u00e9ussie"],"Internal server error":["Erreur interne du serveur"],"Warning":["Avis"],"Add user":["Ajouter un utilisateur"],"Accordion":["Accord\u00e9on"],"Title":["Titre"],"Settings":["Param\u00e8tres"],"Alert Type":["Type d\u2019alerte"],"Info":["Information"],"Danger":["Danger"],"Alert":["Alerte"],"Summary":["Sommaire"],"Expander":["D\u00e9compresseur"],"Show \u201cRead More\u201d":["Afficher \u00ab En savoir plus \u00bb"],"Latest Page":["La page la plus r\u00e9cente"],"Latest Article":["L\u2019article la plus r\u00e9cente"]," Tables exist from deleted sites":["Des tables existent \u00e0 partir de sites supprim\u00e9s"],"Date":["Date"],"User agent":["Agent utilisateur"],"current":["actuel"],"Name":["Nom"],"Website":["Site Web"],"Admin":["Administrateur"],"Success!":["Op\u00e9ration r\u00e9ussie!"],"There is a problem":["Un probl\u00e8me s\u2019est produit"],"Select one":["S\u00e9lectionner parmi les choix"],"Invite a user to collaborate on your GC Articles collection.":["Inviter un utilisateur \u00e0 collaborer sur votre site Articles GC."],"Role":["R\u00f4le"],"Confirmation type":["Type de confirmation"],"Welcome":["Bienvenue"],"Default":["par d\u00e9faut"]}}}
Loading