How to integrate a website with enKod?

CDP (Customer Data Platform) is based on collecting information about customers from various sources, including your website. If the integration is set up correctly, enKod will automatically receive:

  • contact information (email address, phone number, gender, age, etc.) that the customer may have left when filling out forms on your site or in a pop-up;
  • information about the user's behaviour on the site (page opens, product views, add to cart, favourites, comparison; besides, you can set up tracking of any event you need using the «custom event»).

Let's take a closer look at the plan of actions when integrating enKod with the site for all variants of implementation.

Option 1: Transfer contact data from forms on the website to CDP enKod

Method 1. If your site is made in Tilda - use Webhook

All you need:

  1. create mailing groups in enKod, to which contacts from forms will subscribe;
  2. install webhook from enKod in «Site Settings», in the «Forms» section.

The webhook itself and detailed instructions on how to install it you can see in the this article of our Knowledge Base.

How long it takes: 10 minutes.

What expertise is required for implementation: Any employee can handle it, no specific knowledge is required.

Method 2. Set a script from enKod on the site

Script - is a code that is installed on a site and allows you to track the behaviour of a contact on this site. Including transferring data from login or order forms to enKod.

This requires:

1. ask your personal manager to connect the Tracking module to you, if it has not already been connected;

2. create mailing groups in enKod to which the contacts transferred from the site will subscribe;

3. set the script into the site before the closing tag </body>, replacing SYSTEM_NAME with the system name of your enKod account:

<script type="text/javascript">
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = '//cdn.enkod.ru/script/enpop.min.js';
    script.async = true;
    var first = document.getElementsByTagName('script')[0];
    first.parentNode.insertBefore(script, first);
    var enKodBox = window.enKodBox = window.enKodBox || {};    
    var ekEvents = window.ekEvents || [];
    enKodBox['token'] = 'SYSTEM_NAME';
</script>

The system name is not equal to the sending domain or site address. You can get the system name from your account manager.

4. Set a script method to capture a contact on any of the forms (login, registration, quick purchase). For example like this:

<script type="text/javascript">
    ekEvents.push('subscribe',{groups: ['all_subs'], fields: {email: '[email protected]', firstName: 'First name', lastName: 'Last name', phone: '7900000000'}, extraFields: {city: 'Moscow', age: '21'}})
</script>

You can read more about valid fields, their names, types and the script in general in the this section of our knowledge base.

How long does it take30 minutes to an hour

What kind of specialists are needed:

  • Your personal enKod manager - at your request, he will connect the «Tracking» module and tell you the system name to be inserted into the script code.
  • A marketer - to know: from which forms, which contact details to send and which mailing groups in enKod to subscribe contacts to.
  • Developers with knowledge of HTML, CSS and JavaScript. They are needed to directly install the code and set the necessary methods on the site.

Method 3: Use API

APIs (Application Programming Interface) are methods and rules by which different programs exchange information.

The advantage of APIs is increased security: only you control what information, how and when to transfer from the site to enKod.

The disadvantages are that this method is the most labour-intensive and requires a backend developer.

What you will need to do:

  1. ask your personal manager to connect the «Tracking» module to you, if it hasn't been connected yet;
  2. create mailing groups in enKod, to which contacts transferred from the site will subscribe;
  3. for each new visitor create a session according to the method of “Create a new session" method, described in our API-doc;
  4. with each new visit you need to call the «Session start" (only for those visitors who have already been assigned a session);
  5. call a method to transfer data from the form using the method “Contact data with mapping to system fields". The method must be called with session in the headers.

You can read more about transferring data to enKod using API in our knowledge base.

How long it takes: depends on the complexity of the integration, in our experience: up to 2 weeks.

What kind of specialists are needed: A specialist with knowledge of any programming language.

Option 2. Transfer of contact details from the pop-up on the website to CDP enKod

A pop-up - is a pop-up displayed on top of the main content of a web page or application. Pop-ups can be:

  • informative - used for advertising, notifications;
  • collecting - they help to collect user's contact details, usually accompanied by a request to subscribe to a mailing.

By installing a collecting pop-up from enKod, you will be able to transfer user's contact details from the website to our CDP.

You will be required to:

1) ask your account manager to connect the Pop-Ups module to you, if it has not already been connected;

2) create mailing groups in enKod, to which the contacts transferred from the pop-up will subscribe;

3) set the script into the site before the closing tag </body>, beforehand replacing SYSTEM_NAME with the system name of your enKod account:

<script type="text/javascript">
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = '//cdn.enkod.ru/script/enpop.min.js';
    script.async = true;
    var first = document.getElementsByTagName('script')[0];
    first.parentNode.insertBefore(script, first);
    var enKodBox = window.enKodBox = window.enKodBox || {};    
    var ekEvents = window.ekEvents || [];
    enKodBox['token'] = 'SYSTEM_NAME';
</script>

- The system name is not equal to the sending domain or site address. You can get the system name from your account manager.
- If you have already set the script for tracking, you do not need to set the script additionally for pop-ups.

4) Set the pageOpen method (opening any page of the site) on all pages of your site to operate the «Page Visits» segmentation condition:

ekEvents.push('pageOpen')

For more details on installing the script and method for pop-ups, we talk about it in the knowledge base.

5) Create a collecting pop-up in the enKod platform: you can use ready-made templates or customise the pop-up from scratch. In case you have any questions or difficulties, we have prepared detailed instructions on how to create pop-ups in our knowledge base.

6) Activate the pop-up. Now any contact information left in the collecting pop-up on the website will be transferred to enKod.

How long it takes: Depends on the design of the pop-up. On average 2-3 hours for pop-ups with a ready-made template and within a working day for a customised pop-up.

What kind of expertise is needed:

  • Your personal enKod manager - at your request, he will connect you the Pop-Ups module and tell you the system name to be inserted into the script if it was not installed earlier for tracking.
  • Marketer - will designate the content of the pop-up and decide which contact details to pass on and which mailing groups in enKod to subscribe contacts to.
  • Designer - if you choose the customisable pop-up option or decide to design your own from scratch according to enKod's pop-up requirements.
  • Developers with knowledge of HTML, CSS and JavaScript. They are needed to install the script and build the pop-up if enKod's ready-made and customisable pop-up templates are not suitable for you.

Option 3. Transfer events about user behaviour on the site to CDP enKod

By transfer of events from the site, we mean tracking any client's actions on the site and their combinations:

  • opening any page of the site
  • opening a page with a product
  • adding a product to the cart
  • removing an item from the cart
  • adding an item to favourites
  • removing an item from favourites
  • adding an item to comparison
  • removing an item from comparison
  • clearing comparison
  • order
  • order return
  • custom event - if you have a need to track an event not included in the list above, you can create it and pass it to the enKod as instructed.

Method 1: Set the enKod script on the site

This requires:

1) ask your personal manager to connect the «Tracking» module to you, if it has not been connected yet;

2) create mailing groups in enKod, to which you will subscribe your contacts when placing an order on the site (if you need to track this action);

3) set the script into the site before the closing tag </body>, beforehand replacing SYSTEM_NAME with the system name of your account in enKod:

<script type="text/javascript">
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = '//cdn.enkod.ru/script/enpop.min.js';
    script.async = true;
    var first = document.getElementsByTagName('script')[0];
    first.parentNode.insertBefore(script, first);
    var enKodBox = window.enKodBox = window.enKodBox || {};    
    var ekEvents = window.ekEvents || [];
    enKodBox['token'] = 'SYSTEM_NAME';
</script>

The system name is not equal to the sending domain or site address. You can get the system name from your account manager. If you have already set our script, you do not need to set it again.

4) specify the address to the script, its general appearance:

<script type="text/javascript">
    ekEvents.push('event name', { param1: 'and', param2: 'object', param3: 'with parameters' })
</script>

The name of the action and the parameters in the script call depend on what events on the site you plan to pass to enKod. Detailed instructions for each possible case can be found on the this page of our Knowledge Base.

How long it takes: From 2 to 4 working hours, depending on the complexity of the integration and the methods prescribed.

What kind of specialists are needed:

  • Your personal enKod manager - at your request, he will connect you the Tracking module and tell you the system name to be inserted into the script
  • A marketer - he will tell you which events you need to track.
  • Developers with knowledge of HTML, CSS and JavaScript will directly install the code and write the necessary methods on the site.

Method 2: Use API

To do this you need:

  1. ask your personal manager to connect the «Tracking» module to you, if it has not been connected yet
  2. create mailing groups in enKod, to which you will subscribe the contacts transferred to the subscriptions API-method
  3. for each new visitor create a session according to the method of “Create a new session" method, described in our API-doc;
  4. with each new visit you need to call the «Session start method" (only for visitors who have already been assigned a session);
  5. any methods you need should be called with session in the headers. All methods for tracking user actions are available in our API-doc in"Tracking";
  6. it is not recommended to transfer a purchase without a communication channel (email, phone)

You can read more about transferring data to enKod using API in our knowledge base.

How long it takes: depends on the complexity of the integration, in our experience: up to 2 weeks.

What kind of specialists are needed: A specialist with knowledge of any programming language.

Last modified: 2024.07.16 07:40 by Anastasia Aniskova