Articles on: Integrations

How to set up event TRACKING in ActiveCampaign

To set up the ActiveCampaign tracker on your site in GreatPages, follow the tutorial below:


  1. First log in to ActiveCampaign, click **SITE **> **FORMS **and then click CREATE A FORM;


SITE > FORMS > CREATE A FORM


  1. After that, give your form a name;


create form


  1. Click integrate;


click integrate


  1. Press **CTRL **+ **F **and type <form to navigate to where the form settings are:


Search for <form


  1. Now, configure your script with the information from the form generated in ActiveCampaign


configure our script


The code in this image is the one below (change yours and save it to add in GreatPages):


<script type="text/javascript">
/* fornecido pelo ActiveCampaing clicando em Configurações > Rastreamento */
(function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};e[e.visitorGlobalObjectAlias].l=(new Date).getTime();r=t.createElement("script");r.src=o;r.async=true;i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo");
vgo('setAccount', '477004287');/* setAccount é o seu ID de rastreamento, você pode encontrá-lo no ActiveCampaing clicando em Configurações > Rastreamento */
vgo('setTrackByDefault', true);
vgo('process');
</script>

<script type="text/javascript">
window.EnviarActive = function() {
var link = 'greatsoftwares29069', /* Link da conta, também usado para login */
u=3, /* Campos do formulário exportado da ActiveCampaing */
f=3, /* Campos do formulário exportado da ActiveCampaing */
s='', /* Campos do formulário exportado da ActiveCampaing */
c=0, /* Campos do formulário exportado da ActiveCampaing */
m=0, /* Campos do formulário exportado da ActiveCampaing */
act='sub', /* Campos do formulário exportado da ActiveCampaing */
v=2, /* Campos do formulário exportado da ActiveCampaing */
email='input_XXXX', /* Campos do formulário GreatPages */
fullname='input_XXXX'; /* Campos do formulário GreatPages */
_load_script('https://'+link+'.activehosted.com/proc.php?u='+u+'&f='+f+'&s='+s+'&c='+c+'&m='+m+'&act='+act+'&v='+v+'&email='+encodeURIComponent($('#'+email).val())+'&fullname='+encodeURIComponent($('#'+fullname).val())+'&jsonp=true');
}
window._show_thank_you = function(id, message, trackcmp_url, email) {
const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias;
var visitorObject = window[vgoAlias];
if (email && typeof visitorObject !== 'undefined') {
visitorObject('setEmail', email);
visitorObject('update');
} else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) {
_load_script(trackcmp_url);
}
if (typeof window._form_callback !== 'undefined') window._form_callback(id);
};
window._load_script = function(url) {
var head = document.querySelector('head'), script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = url;
head.appendChild(script);
};
</script>


Great, we're almost done!


Now, log in to GreatPages. There we need to create a form because this ActiveCampaign tracker needs your customer's email in a cookie.


  1. Create a form on your page;


Creating a Form in GreatPages


  1. Next, insert this code in the "JavaScript do botão" field:
/* Add no formulário */
if(typeof window.EnviarActive == 'function'){ EnviarActive(); }

Paste the button js


  1. Click PRÉ-VISUALIZAR, and a new tab will open with a preview of your site;
  2. Right-click on the email input (email field) and click inspect;
  3. Now copy the id and paste it into the code field. (We added a comment /* Campos do formulário GreatPages */ )


Inspect element


  1. Now let's paste our Marketing code \o/

Go to the page editing tab, click the gear and then Javascript & CSS


Add a script to the page


Marketing code

Paste the entire script we created and publish your page.


All set, now when a customer fills out this form a cookie will be installed and ActiveCampaign will track them.


Contacts


ActiveCampaign tracker working


Still have questions? Reach out to our team on Chat! We're always happy to help.

Updated on: 08/01/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!