Custom integration via JavaScript events

JavaScript event integration is the most advanced custom integration option with Connectif and allows greater control over when and how events are sent. It involves sending notifications directly via JavaScript, using the Connectif global object and the functions it offers.

To carry out integrations of this type, you’ll need an expert with knowledge of JavaScript, to be able to obtain data from your ecommerce and use the Connectif JS library.


How to integrate Connectif using JavaScript events

You can use this integration to configure the sending of information about what happens on your website, however you must complement this method to synchronize your catalog and configure the Web Push.


1. Add Connectif JavaScript

Configure the Connectif JavaScript on the web to load on all pages and integrate via events.


2. Configure sending information via JavaScript events

Initialize and configure the Connectif JavaScript to get all the information:


3. Report event submissions 

Configure the events that will notify Connectif of what happens on your website:


Sending the visited product event will not sync the product catalog (go to Point 4 to see the options you have for syncing the catalog).

4. Synchronize the product catalog

Product verification does not support sending JavaScript events, as the Connectif product verifier expects to get the "cn_product_visited" tag when visiting the product URL.

You can synchronize your catalog using two different methods:


5. Configure Web Push notifications

To complete the integration you will also need to configure the Service Worker to receive Web Push subscriptions and send notifications to your contacts.


6. Validate the integration

Once you’ve implemented the sending of information to Connectif, the next step is to confirm that the integration has been carried out correctly.



You’ve reached the end of the tutorial.


Do you have questions?
Don’t forget, our Connectif specialists are here to help you. To contact them, just open a Support ticket by clicking the blue “Help” button on your dashboard.


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