Pass Form Submission to ActiveCampaign Using Javascript

SHANE EBERT asked on July 15, 2020 18:05

Hello,

I'd like to connect Kentico with ActiveCampaign. They have a Javascript code that I can add to the master footer of our Kentico site that will pass data to ActiveCampaign.

They explain here: 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

How to pass a contact's email address into javascript code If you've already identified a contact by their email address, you can insert their email address into the site tracking javascript code.

To do this, you will need to add the following line to the tracking code:

vgo('setEmail', 'Email_Address_Goes_Here'); above this line:

vgo('process');

Once the code is in your site, ActiveCampaign will begin collecting data and adding it onto your contact records as contacts are identified.

I am guessing I just need to add the code from ActiveCampaign to the footer of the master page, add the vgo('setEmail', 'Email_Address_Goes_Here'); line to the code, and then replace the 'Email_Address_Goes_Here' with the Kentico Macro or table field for an email address?

I am not technical, so I am not sure where to find the Kentico Macro or table field for the email address and whether if that is what I even need.

Any help is appreciated. Thanks

Correct Answer

Trevor Fayas answered on July 15, 2020 18:54

Got him going with ContactManagementContext.CurrentContact.ContactEmail , once the form submitted the current contact was set and the email was present so he could use it in the footer with the javascript

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.