This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parentBody = document.getElementsByClassName("bodyclass")[0]; | |
var observer = new MutationObserver(function (mutations, myObserver) { | |
var _iteratorNormalCompletion = true; | |
var _didIteratorError = false; | |
var _iteratorError = undefined; | |
try { | |
for (var _iterator = mutations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | |
var mutation = _step.value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener( | |
'wpcf7mailsent', | |
function (event) { | |
dataLayer.push({ | |
event: 'formSent' | |
}); | |
}, | |
false | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Pegue este código tan alto en la etiqueta <head> de la página como sea posible:--> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-5NBJ37F');</script> | |
<!-- End Google Tag Manager --> | |
<!-- Pegue también este código inmediatamente después de la etiqueta <body> de apertura: --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Paste this code as high in the <head> tag of the page as possible: (delete this comment) --> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-WV4KGJK');</script> | |
<!-- End Google Tag Manager --> | |
<!-- Also paste this code immediately after the opening <body> tag: (delete this comment) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use a searchParam for preselect unit | |
// for example here https://cotizador.saladeventasdigital.com/cotizador/index.php?id_subagrupaciones=22&key=idea&portal=&open_dialog=true&unit=87 | |
// we have 86, 88, 89, 76, 77, 85, 87 and 90 units (modelos) | |
// we can preselect unit with javascript | |
var queryStrings = window.location.search; | |
var params = new URLSearchParams(queryStrings); | |
var unit = params.get("unit") | |
if (unit) { | |
document.getElementById("modelos").value = unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add more information to differentiate the dealer and phone type --> | |
<a | |
href="javascript:void(0)" | |
class="mostrar_elemento" | |
data-show="+56 2 29424282" | |
data-dealer="DECONTRACT" | |
data-phoneType="phone" | |
>Ver teléfono</a | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Al inicio del <head> BORRAR ESTE COMENTARIO --> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-NBCGJDH');</script> | |
<!-- End Google Tag Manager --> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Esto va en el head al inicio | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-WXCH65G');</script> | |
<!-- End Google Tag Manager --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function () { | |
(function () { | |
var ldk = document.createElement("script"); | |
ldk.type = "text/javascript"; | |
ldk.async = true; | |
ldk.src = | |
"https://s.cliengo.com/weboptimizer/60770de300a1d4002a251200/607d886ab7d89e002a9fc6bf.js?platform=view_installation_code"; | |
var s = document.getElementsByTagName("script")[0]; | |
s.parentNode.insertBefore(ldk, s); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// with dataLayer object | |
// use this array push when the submitted form was success | |
dataLayer.push({ | |
event: "formSent", | |
formName: "formName", // you can use formName or formId | |
formEmail: "email from form", | |
formPhone: "phone from form", // only if the phone is required in the form | |
formProductName: "product name" // only if have a selected product | |
}); |
NewerOlder