Integrating your newsletter subscription form with VTEX

After you have completed the steps of your Connectif integration with VTEX Legacy if you have a newsletter signup form in your web store, you can integrate it with Connectif to collect this event in real time.

In this article we explain how to implement the contact subscribed to the newsletter event.

 
Implementation time: 15 min.
Difficulty: Low (knowledge of Google Tag Manager is required).
When to use it: When you open your Connectif account.

 

STEP 1. Creating the GTM cn_newsletter_subscription event

1. Locate the form you want to associate with the event.

2. Perform the following push to the dataLayer when the user subscribes to the form:

dataLayer.push({
'event': 'cn_newsletter_subscription',
'emailNewsletter': 'test@example.org'
});
 

In the following example, you can see the result of the push code to the dataLayer.

<form onsubmit="dataLayer.push({'event': 'cn_newsletter_subscription',
'emailNewsletter': document.getElementById('email').value});">
Enter your email: <input type="email" id="email">
<input type="submit">
</form>

STEP 2. Verifying the integration 

3. Browse your website and subscribe to the newsletter.

4. Once subscribed, log in to your Connectif account.

5. Go to "Contacts > View all" and look for the email address you have subscribed to.

6. Once located, click   Details.

Integrar_form_Newsletter_con_VTEX_Legacy_-_1-min.png

7. Go to the Activity tab of the contact form and check that the "Entity subscribed to the newsletter".

Integrar_form_Newsletter_con_VTEX_Legacy_-_2.png

 

 

Success!
Your Newsletter subscription form is already integrated with VTEX Legacy.

 


Keep learning!

To make the most of your Connectif account, we recommend reading these articles next:

Was this article helpful?
0 out of 0 found this helpful