[Fix #512] Crisp: add crisp to homepage

This commit is contained in:
Simon Lehericey 2017-06-28 16:47:57 +02:00 committed by Mathieu Magnin
parent ff8df96547
commit 26afa24e49
4 changed files with 20 additions and 10 deletions

View file

@ -70,6 +70,7 @@ $landing-breakpoint: 1040px;
color: #FFFFFF;
font-size: 24px;
margin-top: 30px;
cursor: pointer;
&:hover {
color: #FFFFFF;
@ -286,6 +287,7 @@ $cta-panel-button-border-size: 2px;
color: #FFFFFF;
font-size: 24px;
text-align: center;
cursor: pointer;
&:hover {
color: #FFFFFF;

View file

@ -0,0 +1,15 @@
- if request.path == root_path
:javascript
window.$crisp=[];
window.CRISP_WEBSITE_ID="779b5050-4cc1-4172-8dd0-bde55716a289";
(function(){
d=document;
s=d.createElement("script");
s.src="https://client.crisp.im/l.js";
s.async=1;
d.getElementsByTagName("head")[0].appendChild(s);
})();
window.$crisp.push(["do", "chat:show"]);
- else
:javascript
window.$crisp && window.$crisp.push(["do", "chat:hide"]);

View file

@ -35,6 +35,7 @@
= render partial: "layouts/new_footer"
= render partial: "layouts/google_analytics"
= render partial: "layouts/mailjet_newsletter"
= render partial: "layouts/crisp"
= javascript_include_tag "application", "data-turbolinks-track": true
= yield :charts_js

View file

@ -8,11 +8,7 @@
%br
vos procédures administratives en quelques minutes
= link_to "Demander une démo",
"mailto:#{t("dynamics.contact_email")}?subject=Demande de démo TPS",
class: "hero-button",
target: "_blank",
onclick: "javascript: ga('send', 'pageview', '/demander-une-demo')"
%a.hero-button{ target: "_blank", onclick: "javascript: ga('send', 'pageview', '/demander-une-demo'); $crisp.push(['do', 'chat:open'])" } Demander une démo
%p.hero-phone-cta
ou nous appeler au 01 40 15 68 49
@ -132,10 +128,6 @@
%h1.cta-panel-title Commencez à dématerialiser vos procédures
%p.cta-panel-explanation Nous vous accompagnons dans la prise en main de loutil
%div
= link_to "Demander une démo",
"mailto:#{t('dynamics.contact_email')}?subject=Demande de démo TPS",
class: "cta-panel-button",
target: "_blank",
onclick: "javascript: ga('send', 'pageview', '/demander-une-demo')"
%a.cta-panel-button{ target: "_blank", onclick: "javascript: ga('send', 'pageview', '/demander-une-demo'); $crisp.push(['do', 'chat:open'])" } Demander une démo
%p.cta-panel-phone-cta
ou nous appeler au 01 40 15 68 49