Commit f01e62c4 authored by Mitchell Wright's avatar Mitchell Wright

send google analytics CID to Marketo

parent 97a79bcf
......@@ -32,6 +32,17 @@ extra_css:
dataLayer.push({event: 'mktoLead',mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p
......
......@@ -55,6 +55,17 @@ extra_css:
dataLayer.push({event: 'mktoLead', mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmformnewlsetter{style: "visibility:hidden;"}
%p
......@@ -94,6 +105,17 @@ extra_css:
dataLayer.push({event: 'mktoLead',mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p
......
......@@ -31,6 +31,17 @@ extra_css:
dataLayer.push({event: 'mktoLead', mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p Submission received!
......@@ -25,6 +25,17 @@ extra_css:
dataLayer.push({event: 'mktoLead', mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
.col-md-9
.installation-instructions
......
......@@ -25,6 +25,17 @@ extra_css:
dataLayer.push({event: 'mktoLead', mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p Thanks for subscribing!
......
......@@ -32,6 +32,17 @@ extra_css:
dataLayer.push({event: 'mktoLead',mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p Submission received! Check your email for your 30-day license key and download instructions.
......@@ -33,6 +33,17 @@
dataLayer.push({event: 'mktoLead',mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
</script>
......
......@@ -26,10 +26,20 @@ extra_css:
form.getFormElem().hide();
document.getElementById('confirmform').style.visibility = 'visible';
ga('send', 'pageview');
ga('send', 'event', 'form', 'submit', 'sales request');
dataLayer.push({event: mktoLead, mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p Submission received! We'll be in contact shortly.
......
......@@ -46,10 +46,20 @@ extra_css:
form.getFormElem().hide();
document.getElementById('confirmform').style.visibility = 'visible';
ga('send', 'pageview');
ga('send', 'event', 'form', 'submit', 'ee free trial');
dataLayer.push({event: mktoLead,mktoFormId: form.getId()});
return false;
});
function getgacid() {
try {
var tracker = ga.getAll()[0];
return tracker.get('clientId');
} catch (e) {
return 'n/a';
}
}
form.vals({
'gacid': getgacid()
});
});
#confirmform{style: "visibility:hidden;"}
%p Submission received! We'll be in touch shortly.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment