How do I use JotForm with ActiveCampaign for Site Tracking on the user's first form submission?

  • jimng.wd
    Asked on March 19, 2020 at 9:00 AM

    The answers posted here:
    https://www.jotform.com/answers/979475-How-to-use-Active-Campaign-tracking-with-JotForm-forms

    and

    https://www.jotform.com/answers/1137242-How-to-use-JotForm-with-Active-Campaign-s-site-tracking

    and 

    https://www.jotform.com/answers/1137242-How-to-use-JotForm-with-Active-Campaign-s-site-tracking

    actually do not answer the burning question of how to integrate Site Tracking on Active Campaign on the website visitor's first form submission using JotForm.

    Here's the issue:

    When a website visitor submits a form on the website, in my case, www.bestseo.sg/strategy-session/
    The form is integrated directly to active campaign, however it does not activate the site tracking for active campaign simply because the email has not been passed to active campaign's tracking code which is as follows:

    vgo('setEmail', 'Email_Address_Goes_Here');


    So now the million dollar question is, what exactly should I replace "Email_Address_Goes_Here" with, in order to pass the Email into ActiveCampaign, so as to commence site tracking on the website visitor who have submitted a jotform?


    Jotform Thread 2216260 Screenshot
  • Sam_G
    Replied on March 19, 2020 at 9:25 AM

    Hi @Jimng.wd,


    Thank you for contacting Support.


    Upon checking, it seems that this should be done on the Active campaign itself.

    https://help.activecampaign.com/hc/en-us/articles/221493708-How-to-set-up-Site-Tracking

    Integration with the form probably will not automatically enable site tracking.

    Can you confirm if you have followed the instruction on the Active campaign?

    Integration with Active Campaign on JotForm will send the email.


    We 

  • JimSEO
    Replied on March 19, 2020 at 9:35 AM

    Hi Sam


    Yes, I have followed the steps shown in https://help.activecampaign.com/hc/en-us/articles/221493708-How-to-set-up-Site-Tracking

    If you take a look closely, you'll notice that it's mentioned there are only 3 ways contacts are identified:

    By submitting a form you created in ActiveCampaign By clicking a link in a campaign or automation email By passing the contact's email address into the site tracking javascript code

    We are definitely using the last method here, which is to pass the contact's email address into the site tracking javascript code.

    So now the issue I face is how do I pass the contact's email address into the site tracking javascript code on JotForm's end?

    Considering that JotForm is the one submitting the data into the site tracking javascript code, I need to pass the correct email listed in ActiveCampaign's code which they mentioned at https://help.activecampaign.com/hc/en-us/articles/221542267-An-overview-of-Site-Tracking#how-to-pass-a-contact-s-email-address-into-javascript-code


    The code appears to be as follows:
    vgo('setEmail', 'Email_Address_Goes_Here');



    As such, I'm quite certain I have to replace 'Email_Address_Goes_Here' with a variable, be it in PHP variable or what not with a JotForm input, so that the email address gets passed into ActiveCampaign to commence site tracking.

    Please let me know if that clarifies and thank you so much for your help.

    Many thanks
    Jim

     

  • Jimmy_D
    Replied on March 19, 2020 at 11:09 AM

    Hi Jim,
    After reading the active campaign documentation, on my understanding, you will need to use a JavaScript or PHP code on your site that looks for the email field in the JotForm and saves it's value into a cookie (or the cookies set by the site tracking code) when the form is submitted.
    Whether you will use JavaScript or PHP code depends on what language is used to build your website.
    You might consider embedding your form to your website using the form downloaded source code and add the site tracking code inside the form's source code. I dare to believe you are a Developer.
    I hope this was helpful. If not feel free to contact us at any time.
    Regards,

  • JimSEO
    Replied on March 19, 2020 at 11:39 AM

    Hi Jimmy

    Thanks for getting back to me on this.

    Unfortunately, I'm not a developer. I'm merely trying to get the site tracking to integrate well with ActiveCampaign and Jotform. 

    May I have your recommendations on how do I get that to work? 

    My website is being built using Wordpress, which I think in the backend is PHP, and on the front end there is Javascript.


  • Vanessa_T
    Replied on March 19, 2020 at 12:28 PM

    Yes you are correct, Wordpress uses PHP and Javascript.

    Please note that you cannot add any script within JotForm. And if I'm not mistaken, you cannot embed your JotForm using the source code within Wordpress as well thru the admin panel since it will create conflicts.

    If however you know how to dissect Wordpress's code, I mean the actual Wordpress files underneath what you see in the website, then you can copy your form's source code and add the Active Campaign Site Tracking script that will read the value on your form's email field.

    https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form

    You may want to reach out to Wordpress support team for this since it entails disrupting Wordpress's core codes. Or you can also hire a developer.

  • JimSEO
    Replied on March 19, 2020 at 10:57 PM

    Hi Vanessa

    I'm currently using the Card Form, instead of the Classic Form, and it seems like I am unable to extract the Source Code of the form.

    Is there any workaround for this or is there simply no way?
    1584673036No Source Code Available Screenshot 10

  • Sonnyfer JotForm Support
    Replied on March 19, 2020 at 11:46 PM

    Hi,

    If that's the case, please try embedding your form using Wordpress method instead. 

    Kindly refer to the guide below for other embed options available: 

    Which-Form-Embed-Code-Should-I-Use

    1584675458iframeee Screenshot 10

    Moreover, as suggested by my colleague, you may want to reach out to WordPress support team as what you're trying to achieve would disrupt Wordpress' core codes.

  • JimSEO
    Replied on March 20, 2020 at 12:37 AM

    Hi Sonny

    I can embed the code perfectly fine, that would not be an issue.

    However, the issue is with accessing the full source code.

    Using the methods that you just listed which is the Wordpress method or at https://www.jotform.com/help/67-Which-Form-Embed-Code-Should-I-Use , it seems like I still can't get the full source code in order to pass the User's Entered Email into ActiveCampaign, which is what I'm really trying to do here.

    So if you refer back to my very initial post, which is trying to post the Email Address into ActiveCampaign upon the form submission, how do I do that?

    Also, I'm using Wordpress.org, the Open Source Content Management System, so I can't approach Wordpress.com for Support.

     

  • Elton Support Team Lead
    Replied on March 20, 2020 at 2:58 AM

    Unfortunately, we do not provide full source code for card forms. However, you can open your standalone form and view the page source to get its full source code. Example:

    How do I use JotForm with ActiveCampaign for Site Tracking on the users first form submission? Image 1 Screenshot 20

    I also checked your form and it is already integrated with ActiveCampaign and both the full name and email fields are mapped into your ActiveCampaign fields. So when the form is submitted, the name and email should be sent to your ActiveCampaign. I assume this is already set?

    If you also want to capture the page URL from where the form is embedded, you can use the Get Form Page URL widget and map it to a field on your ActiveCampaign. https://www.jotform.com/widgets/get-form-page-url

    If you want to capture the referrer, use this widget.

    https://www.jotform.com/widgets/get-referrer

    If I've missed something here, let us know.


  • JimSEO
    Replied on March 20, 2020 at 3:03 AM

    Hi Elton

    Yes it is integrated with ActiveCampaign, it automatically creates a new contact with the name and email for me..

    But let's circle back to the very first post of the thread...

    It's the site tracking that is not working the moment a form submission occurs.

    In the ActiveCampaign site tracking code, it requires the site tracking to insert the piece of code that requires the email field, in order for site tracking to commence the moment a form is being submitted on JotForm.

    I hope that clarifies what I'm trying to achieve.

    Otherwise, let me know.

    Thank you.

  • roneet
    Replied on March 20, 2020 at 6:21 AM

    Could you please ask the ActiveCampaign support on this as from our end the integration is already creating a contact with the name and the email.

    Another workaround would be, you can pass the email address from the form to your website along with the URL parameters via the Thankyou redirect.

    For example.

    www.yourwebsite.com/email={email}

    {email} is passed from the form to your website. So you can insert the ActiveCampaign tracking code in this mediator page and set the email data to the email variable in your page and then set this email variable in the PHP code which you have configured.

    Related Help Articles:

    How-to-Automatically-Pass-Form-Data-to-Another-Form

    How-to-Post-Submission-Data-to-Thank-You-Page 

    To get a field's Unique Name, you can refer to the guide that I'm linking below.

    How-to-Find-Field-IDs-and-Names