Skip to content

Commit a4ba647

Browse files
chore: Lead integration
1 parent 8f03ea6 commit a4ba647

27 files changed

+211
-35
lines changed

assets/styles/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ nav {
458458
font-weight: 800;
459459
}
460460

461+
.newsletter-box__text {
462+
font-size: 1.375rem;
463+
line-height: 1.45;
464+
}
465+
461466
.newsletter-box__description {
462467
font-size: 1.375rem;
463468
line-height: 1.45;
@@ -475,6 +480,7 @@ nav {
475480
.newsletter-box__button {
476481
width: 100%;
477482
background: #f35062;
483+
cursor: pointer;
478484
background-image: linear-gradient(
479485
180deg,
480486
rgba(255, 255, 255, 0.05) 0%,

components/Newsletter.vue

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
/>
1818
</div>
1919
<div
20+
v-if="!successResult"
2021
class="col-lg-6 px-0 px-md-1 mt-5 mt-lg-0"
2122
data-aos="fade-up"
22-
data-aos-once="true"
2323
data-aos-duration="250"
2424
data-aos-easing="ease-in-out"
2525
data-aos-delay="50"
@@ -32,11 +32,20 @@
3232
</label>
3333
<input
3434
id="input-box"
35-
type="text"
35+
v-model="$v.email.$model"
36+
name="email"
37+
type="email"
3638
placeholder="Digite seu melhor e-mail"
3739
class="newsletter-box__input mb-2 mb-lg-0"
38-
/><button class="newsletter-box__button">Enviar</button>
39-
<p class="newsletter-box__disclaimer">
40+
:class="errorClass($v.email)"
41+
@keyup.enter="postLead"
42+
/><button class="newsletter-box__button" @click="postLead">
43+
Enviar
44+
</button>
45+
<p
46+
v-if="$v.email.email && $v.email.required"
47+
class="newsletter-box__disclaimer"
48+
>
4049
Mantemos o sigilo dos seus dados. Leia nossa
4150
<a
4251
href="#"
@@ -46,9 +55,71 @@
4655
>política de privacidade.</a
4756
>
4857
</p>
58+
<p v-else class="newsletter-box__disclaimer">
59+
Por favor preencha o campo de email
60+
</p>
61+
</div>
62+
</div>
63+
<div v-if="successResult" class="col-lg-6 px-0 px-md-1 mt-5 mt-lg-0">
64+
<div class="newsletter-box">
65+
<h1 class="newsletter-box__title">Email cadastrado!</h1>
66+
<p class="newsletter-box__text">
67+
Você receberá novidades no seu e-mail
68+
</p>
4969
</div>
5070
</div>
5171
</div>
5272
</div>
5373
</section>
5474
</template>
75+
76+
<script>
77+
import { required, email } from 'vuelidate/lib/validators'
78+
export default {
79+
data() {
80+
return {
81+
email: '',
82+
successResult: false,
83+
}
84+
},
85+
validations: {
86+
email: {
87+
required,
88+
email,
89+
},
90+
},
91+
methods: {
92+
async postLead() {
93+
this.$v.$touch()
94+
if (!this.$v.$invalid) {
95+
const url = `https://api.rd.services/platform/conversions?api_key=${process.env.API_KEY}`
96+
const lead = await this.$axios.$post(url, {
97+
event_type: 'CONVERSION',
98+
event_family: 'CDP',
99+
payload: {
100+
conversion_identifier: 'teste_coversion',
101+
email: this.email,
102+
},
103+
})
104+
if (lead) {
105+
this.email = ''
106+
this.successResult = true
107+
}
108+
}
109+
},
110+
errorClass(validation) {
111+
return {
112+
error: validation.$error,
113+
dirty: validation.$dirty,
114+
}
115+
},
116+
},
117+
}
118+
</script>
119+
120+
<style>
121+
.error {
122+
border-color: #e11c09 !important;
123+
background-color: #ffe9e7 !important;
124+
}
125+
</style>

dist/200.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!doctype html>
22
<html lang="en" data-n-head="%7B%22lang%22:%7B%221%22:%22en%22%7D%7D">
33
<head>
4-
<title>Pdal</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta data-n-head="1" data-hid="description" name="description" content="Pdal - Aulas de Cycling pelo celular com os melhores professores."><meta data-n-head="1" data-hid="og:title" name="og:title" content="Pdal"><meta data-n-head="1" data-hid="og:description" name="og:description" content="Pdal - Aulas de Cycling pelo celular com os melhores professores."><meta data-n-head="1" data-hid="og:url" name="og:url" content="https://pdal.com.br"><meta data-n-head="1" data-hid="og:image" name="og:image" content="https://pdal.com.br/img/Pdal-FB.jpg"><meta data-n-head="1" data-hid="twitter:card" name="twitter:card" content="summary"><meta data-n-head="1" data-hid="twitter:description" name="twitter:description" content="Pdal - Aulas de Cycling pelo celular com os melhores professores.. Conheça nossas iniciativas e baixe o nosso aplicativo!"><meta data-n-head="1" data-hid="twitter:title" name="twitter:title" content="Pdal - Aulas de Cycling pelo celular com os melhores professores."><meta data-n-head="1" data-hid="twitter:image" name="twitter:image" content="https://pdal.com.br/img/Pdal-FB.jpg"><meta data-n-head="1" data-hid="charset" charset="utf-8"><meta data-n-head="1" data-hid="mobile-web-app-capable" name="mobile-web-app-capable" content="yes"><meta data-n-head="1" data-hid="apple-mobile-web-app-title" name="apple-mobile-web-app-title" content="Pdal"><meta data-n-head="1" data-hid="theme-color" name="theme-color" content="#0f161d"><meta data-n-head="1" data-hid="og:type" name="og:type" property="og:type" content="website"><meta data-n-head="1" data-hid="og:site_name" name="og:site_name" property="og:site_name" content="Pdal"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link data-n-head="1" rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"><link data-n-head="1" rel="dns-prefetch" href="https://ajax.googleapis.com"><link data-n-head="1" rel="dns-prefetch" href="https://assets.pdal.com.br"><link data-n-head="1" rel="dns-prefetch" href="https://fonts.googleapis.com"><link data-n-head="1" rel="dns-prefetch" href="https://yt3.ggpht.com"><link data-n-head="1" rel="dns-prefetch" href="https://i.ytimg.com"><link data-n-head="1" rel="dns-prefetch" href="https://googleads.g.doubleclick.net"><link data-n-head="1" rel="dns-prefetch" href="https://www.google.com"><link data-n-head="1" rel="dns-prefetch" href="https://static.doubleclick.net"><link data-n-head="1" rel="shortcut icon" href="/_nuxt/icons/icon_64x64.bf1648.png"><link data-n-head="1" rel="apple-touch-icon" href="/_nuxt/icons/icon_512x512.bf1648.png" sizes="512x512"><link data-n-head="1" rel="manifest" href="/_nuxt/manifest.f5f12cf9.json" data-hid="manifest"><script data-n-head="1" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script><script data-n-head="1" src="https://code.jquery.com/jquery-3.5.1.min.js"></script><script data-n-head="1" src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script><script data-n-head="1" data-hid="gtm-script">window._gtm_init||(window._gtm_init=1,function(t,e,n,a,o){t[n]=1==t[n]||"yes"==e[n]||1==e[n]||1==e.msDoNotTrack||t[a]&&t[a][o]&&t[a][o]()?1:0}(window,navigator,"doNotTrack","external","msTrackingProtectionEnabled"),function(a,o,i,g,m){a[m]={},a._gtm_inject=function(t){var e,n;a.doNotTrack||a[m][t]||(a[m][t]=1,a[g]=a[g]||[],a[g].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),e=o.getElementsByTagName(i)[0],(n=o.createElement(i)).async=!0,n.src="https://www.googletagmanager.com/gtm.js?id="+t,e.parentNode.insertBefore(n,e))},a._gtm_inject("GTM-PML7NMN")}(window,document,"script","dataLayer","_gtm_ids"))</script><link rel="preload" href="/_nuxt/c90589d.js" as="script"><link rel="preload" href="/_nuxt/e2ec558.js" as="script"><link rel="preload" href="/_nuxt/f26fdf8.js" as="script"><link rel="preload" href="/_nuxt/aca35c7.js" as="script">
4+
<title>Pdal</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta data-n-head="1" data-hid="description" name="description" content="Pdal - Aulas de Cycling pelo celular com os melhores professores."><meta data-n-head="1" data-hid="og:title" name="og:title" content="Pdal"><meta data-n-head="1" data-hid="og:description" name="og:description" content="Pdal - Aulas de Cycling pelo celular com os melhores professores."><meta data-n-head="1" data-hid="og:url" name="og:url" content="https://pdal.com.br"><meta data-n-head="1" data-hid="og:image" name="og:image" content="https://pdal.com.br/img/Pdal-FB.jpg"><meta data-n-head="1" data-hid="twitter:card" name="twitter:card" content="summary"><meta data-n-head="1" data-hid="twitter:description" name="twitter:description" content="Pdal - Aulas de Cycling pelo celular com os melhores professores.. Conheça nossas iniciativas e baixe o nosso aplicativo!"><meta data-n-head="1" data-hid="twitter:title" name="twitter:title" content="Pdal - Aulas de Cycling pelo celular com os melhores professores."><meta data-n-head="1" data-hid="twitter:image" name="twitter:image" content="https://pdal.com.br/img/Pdal-FB.jpg"><meta data-n-head="1" data-hid="charset" charset="utf-8"><meta data-n-head="1" data-hid="mobile-web-app-capable" name="mobile-web-app-capable" content="yes"><meta data-n-head="1" data-hid="apple-mobile-web-app-title" name="apple-mobile-web-app-title" content="Pdal"><meta data-n-head="1" data-hid="theme-color" name="theme-color" content="#0f161d"><meta data-n-head="1" data-hid="og:type" name="og:type" property="og:type" content="website"><meta data-n-head="1" data-hid="og:site_name" name="og:site_name" property="og:site_name" content="Pdal"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link data-n-head="1" rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"><link data-n-head="1" rel="dns-prefetch" href="https://ajax.googleapis.com"><link data-n-head="1" rel="dns-prefetch" href="https://assets.pdal.com.br"><link data-n-head="1" rel="dns-prefetch" href="https://fonts.googleapis.com"><link data-n-head="1" rel="dns-prefetch" href="https://yt3.ggpht.com"><link data-n-head="1" rel="dns-prefetch" href="https://i.ytimg.com"><link data-n-head="1" rel="dns-prefetch" href="https://googleads.g.doubleclick.net"><link data-n-head="1" rel="dns-prefetch" href="https://www.google.com"><link data-n-head="1" rel="dns-prefetch" href="https://static.doubleclick.net"><link data-n-head="1" rel="shortcut icon" href="/_nuxt/icons/icon_64x64.bf1648.png"><link data-n-head="1" rel="apple-touch-icon" href="/_nuxt/icons/icon_512x512.bf1648.png" sizes="512x512"><link data-n-head="1" rel="manifest" href="/_nuxt/manifest.f5f12cf9.json" data-hid="manifest"><script data-n-head="1" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script><script data-n-head="1" src="https://code.jquery.com/jquery-3.5.1.min.js"></script><script data-n-head="1" src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script><script data-n-head="1" data-hid="gtm-script">window._gtm_init||(window._gtm_init=1,function(t,e,n,a,o){t[n]=1==t[n]||"yes"==e[n]||1==e[n]||1==e.msDoNotTrack||t[a]&&t[a][o]&&t[a][o]()?1:0}(window,navigator,"doNotTrack","external","msTrackingProtectionEnabled"),function(a,o,i,g,m){a[m]={},a._gtm_inject=function(t){var e,n;a.doNotTrack||a[m][t]||(a[m][t]=1,a[g]=a[g]||[],a[g].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),e=o.getElementsByTagName(i)[0],(n=o.createElement(i)).async=!0,n.src="https://www.googletagmanager.com/gtm.js?id="+t,e.parentNode.insertBefore(n,e))},a._gtm_inject("GTM-PML7NMN")}(window,document,"script","dataLayer","_gtm_ids"))</script><link rel="preload" href="/_nuxt/80a16ce.js" as="script"><link rel="preload" href="/_nuxt/e195e37.js" as="script"><link rel="preload" href="/_nuxt/65f6bdc.js" as="script"><link rel="preload" href="/_nuxt/435d3e5.js" as="script">
55
</head>
66
<body>
7-
<noscript data-n-head="1" data-hid="gtm-noscript" data-pbody="true"><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PML7NMN&" height="0" width="0" style="display:none;visibility:hidden" title="gtm"></iframe></noscript><div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #f35062;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{content:{dbHash:"442c1966"}},staticAssetsBase:"/_nuxt/static/1605035490"}</script>
8-
<script src="/_nuxt/c90589d.js"></script><script src="/_nuxt/e2ec558.js"></script><script src="/_nuxt/f26fdf8.js"></script><script src="/_nuxt/aca35c7.js"></script></body>
7+
<noscript data-n-head="1" data-hid="gtm-noscript" data-pbody="true"><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PML7NMN&" height="0" width="0" style="display:none;visibility:hidden" title="gtm"></iframe></noscript><div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #f35062;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{content:{dbHash:"29c77c7c"}},staticAssetsBase:"/_nuxt/static/1605207700"}</script>
8+
<script src="/_nuxt/80a16ce.js"></script><script src="/_nuxt/e195e37.js"></script><script src="/_nuxt/65f6bdc.js"></script><script src="/_nuxt/435d3e5.js"></script></body>
99
</html>

dist/_nuxt/b987111.js renamed to dist/_nuxt/0a3064c.js

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

dist/_nuxt/0e83e9b.js

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

0 commit comments

Comments
 (0)