Remove old sendinblue interface through JavaScript
This commit is contained in:
parent
f9a4369a54
commit
ceb354963e
2 changed files with 0 additions and 26 deletions
|
@ -1,25 +0,0 @@
|
|||
:javascript
|
||||
(function() {
|
||||
window.sib = { equeue: [], client_key: "#{Rails.application.secrets.sendinblue[:client_key]}" };
|
||||
/* OPTIONAL: email for identify request*/
|
||||
window.sib.email_id = '#{current_administrateur.email}';
|
||||
window.sendinblue = {}; for (var j = ['track', 'identify', 'trackLink', 'page'], i = 0; i < j.length; i++) { (function(k) { window.sendinblue[k] = function() { var arg = Array.prototype.slice.call(arguments); (window.sib[k] || function() { var t = {}; t[k] = arg; window.sib.equeue.push(t);})(arg[0], arg[1], arg[2]);};})(j[i]);}var n = document.createElement("script"),i = document.getElementsByTagName("script")[0]; n.type = "text/javascript", n.id = "sendinblue-js", n.async = !0, n.src = "https://sibautomation.com/sa.js?key=" + window.sib.client_key, i.parentNode.insertBefore(n, i), window.sendinblue.page();
|
||||
})();
|
||||
|
||||
sendinblue.identify('#{current_administrateur.email}', {
|
||||
'DS_NB_DEMARCHES_BROUILLONS': '#{current_administrateur.procedures.brouillons.count}',
|
||||
'DS_NB_DEMARCHES_ACTIVES': '#{current_administrateur.procedures.publiees.count}',
|
||||
'DS_NB_DEMARCHES_ARCHIVES': '#{current_administrateur.procedures.archivees.count}',
|
||||
'DS_SIGN_IN_COUNT' : '#{current_administrateur.sign_in_count}',
|
||||
'DS_CREATED_AT' : '#{current_administrateur.created_at}',
|
||||
'DS_ACTIVE' : '#{current_administrateur.active}',
|
||||
'DS_ID' : '#{current_administrateur.id}'
|
||||
// Dans l'ideal :
|
||||
// 'nom' : //pour personnaliser les emails
|
||||
// 'prenom' : //pour personnaliser les emails
|
||||
// 'nb_demarches_prod' : // Avec plus de 20 dossiers
|
||||
// 'nb_demarches_test' : // Avec entre 1 et 20 dossiers
|
||||
// 'nb_services' : //combien de service ?
|
||||
// 'nb_instructeurs' : //combien d'instructeur en tout ?
|
||||
// 'nb_dossiers' : //combien de dossier en tout ?
|
||||
});
|
|
@ -17,7 +17,6 @@
|
|||
= csrf_meta_tags
|
||||
|
||||
= render partial: "layouts/matomo"
|
||||
= render partial: "layouts/sendinblue"
|
||||
|
||||
:javascript
|
||||
DATA = [{
|
||||
|
|
Loading…
Reference in a new issue